3
ctnqhk
3y

I looked at a PR for some work a dev agency is doing for us. For some reason, the dev directly modified css rules instead of making updates to the SCSS files and running the compiler. WTF. I asked why and isn’t the compiler working. Just got an answer saying that was his mistake. That’s not a mistake, but that’s idiocy I’m sorry. Dev agency is supposed to be doing code reviews too, but I’m pretty sure they would have merged that. We have another repo where the same thing happened—only it was dozens of lines of code instead of one or two. Luckily that repo doesn’t get many new feature requests, but I do have to selectively pick lines to commit whenever I make style updates. It’s a nightmare. I know it must be hard to jump into a code base you’re not familiar with and there might not be dev docs, but for the love of god don’t make maintainability a nightmare. I shouldn’t have to be a babysitter. Bet they’re regretting that added me as a reviewer for the PR.

Comments
  • 3
    If there's SCSS then the compiled CSS shouldn't be in the repo in the first place. A Git repo should only contain sources, and the scripts necessary to build them.
  • 1
    @lbfalvy In this repo, the css file is what the website uses for the styling. And this is what the dev agency set up years before I staring working in the code. I don’t know what’s in their head most of the time.
  • 1
    @ctnqhk I know what SCSS is. You build the CSS locally after each modification and checkout, i.e. when the sources change. The repo contains nothing but sources and build scripts.
  • 0
    Generally speaking, you want to avoid repetition in Git as much as possible because everyone will have to synchronise all of it every time and resolving merge conflicts in a file for which the source of truth isn't either branch but a compiler is stupid.
  • 1
    @lbfalvy My apologies. I didn’t mean to come off as demeaning your comment. I was just trying to say the project had been setup this way for years.
  • 1
    @ctnqhk yeah I misread the tone
  • 1
    @ctnqhk

    setup gitignore.

    git clean -xdfi

    Delete everything interactive what isn't properly allowed.

    Done.

    If someone is angry: risk prevention.
Add Comment