Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Kind of a dick for running your style processor on another authors code, just saying.
-
@Hastouki I disagree, in our team we have strict Pr reviews for codestyle and prettier/eslint is required, besides that, prettier fixes the entire file for me not only the line I just wrote. Perhaps it's configurable to only fix lines but that sounds weird for our team.
Idk why the file wasn't originally up to standards, perhaps it was old from before we implemented the git branching flow.
Ofcourse, the post didn't specify my team's workflow/requirements so I understand what you mean. -
@alexbrooklyn I assumed it was an open source project when you said pull request. I haven't actually ever worked with a tram that uses pull requests internally.
Still a dick tho... Just sayin -
@Hastouki It's quite normal these days for teams to use PRs internally. Makes a great basis to do code reviews.
-
taigrr8786yWe do this. If someone forgot to apply styles when you pull down the code, run the linter first, save it, commit it.
Then make your changes. Commit it.
Then rebase the linting to after your changes. That way it's easy to see your changes in the code review vs the linting etc.
At least that's how we do it. Or rather, that's the official way. Some people just can't be bothered to git gud with git -
taigrr8786y@arcsector of course, but we use it to verify and reject prs rather than auto fix and generate new commits. I don't like the idea of my ci workflow generating commits every time someone can't be bothered to initialize their linting, and I don't really trust automatic rebases.
-
@taigrr haha one of my coworkers just has an alias from "git commit" to his linting cmd which then runs git commit
-
taigrr8786y@arcsector there's a bunch of things I wish I could get people to do. The preferred way would be for everyone to just initialize their commit hooks properly.
-
@vlatkozelka Most of my career was through SourceSafe, CVS, SVN and later Git. Git has been around for quite some time, but for those of us who have been in the industry for 15+ years, it's not that surprising to not have used PRs at work. If I had a boss I'd definitely propose it, I'm a stickler for code quality and proper reviews. Maybe I'll look into making it part of my process.
Let me make a small change to this file, a one-line pull request will probably be accepted right away
* saves *
Prettier runs...
EsLint runs...
StyleLint runs...
60 changes submitted for review
rant