1) Should static analysis tool config be placed in source control? This config i
ID: 659977 • Letter: 1
Question
1) Should static analysis tool config be placed in source control? This config is not needed to compile/run software and some developers can have different preferences (even within coding convention). On the other hand placing such config in source control and declaring static analysis tool as "official part of project" can encourage everybody to test his code and help keep it very consistent. This question is mostly about open source because in commercial projects you will establish strict workflow anyway.
2) Should convenience scripts (generating documentation, running analysis, running tests, deploying, generating installer) be placed in source control? Theses scripts have to be cross-platform and may not work well on every system. People may just use IDE to accomplish some of these tasks. But requiring everybody to write his own boilerplate seems somewhat stupid to me. This question is mostly about interpreted languages because when working with compiled languages this is usually achieved using build tool which is not needed to build program in dynamic languages.
Explanation / Answer
I understand your hesitation.
Even though those scripts are useful they are not part of the build process, and as such are not necessary, per se.
However I am on the opinion that any configuration file / specifically tailored script that runs on the code should be in the source control repository.
Why ?
Because if I check out an old version, and the new scripts does not work on it, how am I supposed to run the static analysis ? How am I supposed to update the documentation ?
Anything that interacts directly with the code should be embedded in the code package ... or referenced.
If you wish to maintain the scripts outside of the source control, for example because they're quite big and impact the checkout/update time, it's fine too, however you'll need to properly deliver them (versioned) and have a file tucked with the code that describe which version of the script/tool should be used (works).
Generally, configuration files are never big enough to warrant being delivered (and versioned) separately, from my experience.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.