2
9 Comments

PRs for auto linting fixes

Would you pay for a service that would submit PRs for auto linting fixes with a zero configuration, low noise ration?

Lets say if your a ruby developer you'd get PR for rubocop issues, but without some of the noisy like line lengths...

If not, would you be interested if it was for higher complexity tasks like auto refactoring conditions for readability.

on August 2, 2020
  1. 1

    My initial reaction to this was “no”. The problem as you first described it could be done with a few lines of bash in a GitHub action and I’ve seen some services out there that do something like this, but only if you do a whole bunch of things exactly the way they want you to.

    I thought about it some more though, especially with regards to you comment around higher complexity tasks. I do think there could be a place for automated could simplification. For example, something that optimizes cyclomatic complexity if you have a deeply nested if-tree but there’s a more readable way that you didn’t see.

    So, tl;dr, I’m not convinced anyone would pay to run rubocop automatically, but if you build something that could do quality improvements a level beyond that, maybe.

    1. 1

      Thanks for the response.

      I’ve seen some services out there that do something like this, but only if you do a whole bunch of things exactly the way they want you to.
      Can you point me to one?

      I’m not convinced anyone would pay to run rubocop automatically
      But you do think they would pay for nicer parsing/display? (looking at your product)

      I think there is a shared issue with the offerings in the context I put fourth here
      https://www.indiehackers.com/post/process-efficiency-improvement-solutions-ventures-e0a151f2b5?utm_campaign=forum-notification&utm_medium=email&utm_source=indie-hackers-emails
      Exp. professionals are probably not interested, but newer ones are harder to pitch to, as they don't know the problem space...
      Like thinking back to the first interaction with linters, they aren't self intuitive, and don't provide the best experience, and are just one more thing an already information loaded person needs to concern oneself with.
      Any thoughts around that?

      1. 2

        Can you point me to one?

        I'm pretty sure I was thinking of CodeClimate. It's been a while since I used it, but my frustrations at the time were that it used eslint under the hood, but didn't use my eslint config, so it marked a whole bunch of errors that weren't relevant. I think it might've also had issues where it was treating non-code files as code and marking them problematically.

        But you do think they would pay for nicer parsing/display? (looking at your product)

        They already do. CRR also isn't so much about nicer display (though, that's probably coming), but really solves the problem of getting failures out of CI systems with bad UX.

        Exp. professionals are probably not interested, but newer ones are harder to pitch to, as they don't know the problem space...

        If that's your target market, I think you'll find very quickly that the people paying for it don't stay long-time users; I think they'll quickly figure out how linters work and realize it's something they can do themselves. I can see where you'd use a service like you're describing if you don't want to setup e.g. rubocop in your project, but I think folk's quickly want to run it locally rather than waiting for an automated tool do things.

        All that being said though, I think this could be a really cool product that folks would pay for, I just think you need to be targeting more complexity than automating rubocop -a.

        You'd probably want to go after enterprises and small business - any group that's going to have a large number of repos that are only vaguely centrally managed. Then, your tool would allow a central group to enforce company-wide coding standards.

        I really do think there's a lot of potential for the next level of refactorings beyond just rubocop's rules. That's probably a not-insignificant undertaking, though, especially if you wan to support multiple languages.

        Much as I hate to suggest a use for machine learning (I feel like it's just a little over-hyped these days 😀 ), I could see where you might be able to build up a model that suggests improvements either based on what the rest of the codebase looks like, or the codebase's change history, or maybe just histories of open source projects.

        So, I guess what I'm trying to say is, I really do think there's potential there, I just think the product has to go beyond automating existing tools.

        1. 1

          You noted so many things that already crossed my mind, which is awesome to get some validation on. Thanks a lot!

          Is CRR a side project for you? what's your vision for it?

          1. 1

            Yep, very much a side project. I'm finding I'm entirely dependent on getting it on the GitHub marketplace's trending page to get signups, so growth is super-spotty. I'm working on a few different marketing possibilities to get around that problem.

            Long-term, I sort of see two possibilities:

            • CRR keeps pretty much just its current feature set but becomes part of a suite of relatively simple tools that solve problems startups shouldn't have to deal with themselves. (CRR was inspired by 1. digging through 20 clicks of TeamCity pages to find the logs that explained which test failed and 2. the fact that no one was bothering with GitHub's Checks API).
            • The marketing efforts payoff and I get enough signups to justify building some big-ticket features I've been thinking about. So far, CRR is pretty much stateless; it only stores your test data for approximately the amount of time it takes to process the test report and it has very limited permissions to GitHub. If I start storing test results indefinitely, a lot of really interesting possibilities open up around identifying problem tests, throwing out warnings when a test's duration changes, and so forth. Basically, I've got a bunch of mostly enterprise oriented features I'd love to build, but I don't yet have a way into that market to justify spending the time on it. It's a bit of a chicken and egg problem :)
  2. 1

    TBH no. I primarily work with Go and JS/TS. With JS/TS I have something like prettier setup on my machine so on save everything is formatted, then I have pre commit hooks for contributors that will lint any staged changes.

    1. 1

      Thanks for the response.

      Do you customise prettier or it is always good for you on default?

      Do you use something like codeclimate that monitors complexity?

      What about things that aren't available as free linter fixes? like doing auto refactoring for read complexity reductions?

      1. 1

        Depends on the organisation, they're usually a little different.

        Never used anything like that so can't comment sorry. Usually complex code shouldn't get past the PR process without being heavily commented.