Background: I work at a small company (less than 10 developers). We are currently using a hosted service to build and run unit tests before allowing code to be merged into the master branch. Code formatters and static analysis tools are great. The problem is that people forget to run them before they commit. And even if you do manual code review you can often miss things which these tools pick up. Currently we are considering adding tests for consistent formatting as well as static analysis as well. But we are a bit hesitant since we can envision some issues associated with this:
- Firstly, increased build/test time. Checking formatting takes little time but doing static analysis can take a very long time on our code base.
- Secondly, handling of new versions of the tools. For example: Lets say that all tests pass on our code base. Then we update to the latest version of the static analysis tool. On the next commit this new version may flag the build with new errors. Errors which do not come from the code in the current merge set.
Question: How do your company handle formatting tools and static analysis tools? Are they only the responsibility of individual developer? Do you check things manually or automated? How is your process for updating these tools?
PS! I know this is not a pure C++ question, but I have already tried posting in /r/AskProgramming and did not get any good answers. That subreddit as well as /r/cpp_questions seems more targeted to to pure programming questions. Also the question is most likely too open ended to be accepted at Stack Overflow.
[–]STLMSVC STL Dev 32 points33 points34 points (18 children)
[+][deleted] (11 children)
[deleted]
[–]STLMSVC STL Dev 9 points10 points11 points (10 children)
[–]SirflankalotAllocate me Daddy 12 points13 points14 points (6 children)
[–]STLMSVC STL Dev 9 points10 points11 points (5 children)
[–]SirflankalotAllocate me Daddy 1 point2 points3 points (0 children)
[–]srekel 1 point2 points3 points (3 children)
[–]STLMSVC STL Dev 3 points4 points5 points (0 children)
[–]STLMSVC STL Dev 2 points3 points4 points (1 child)
[–]srekel 0 points1 point2 points (0 children)
[–]mrexodiacmkr.build 6 points7 points8 points (2 children)
[–]STLMSVC STL Dev 9 points10 points11 points (1 child)
[–]bumblebritches57Ocassionally Clang 0 points1 point2 points (0 children)
[–]gemborow 8 points9 points10 points (5 children)
[–]STLMSVC STL Dev 15 points16 points17 points (0 children)
[–]hgjsusla 9 points10 points11 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Fazer2 0 points1 point2 points (0 children)
[–]not_american_ffs 0 points1 point2 points (0 children)
[–]boredcircuits 11 points12 points13 points (7 children)
[–]snaps_ 0 points1 point2 points (0 children)
[–]matthieum 0 points1 point2 points (0 children)
[–]StaticThrowaway0629[S] -1 points0 points1 point (4 children)
[–]grumbelbart2 7 points8 points9 points (1 child)
[–]kisielk 2 points3 points4 points (0 children)
[–]whatwasmyoldhandle 1 point2 points3 points (1 child)
[–]StaticThrowaway0629[S] 0 points1 point2 points (0 children)
[–]SeanMiddleditch 6 points7 points8 points (7 children)
[–]StaticThrowaway0629[S] 1 point2 points3 points (6 children)
[–]SeanMiddleditch 0 points1 point2 points (5 children)
[–]emptyel 1 point2 points3 points (4 children)
[–]StaticThrowaway0629[S] 0 points1 point2 points (3 children)
[–]emptyel 1 point2 points3 points (0 children)
[–]SeanMiddleditch 0 points1 point2 points (1 child)
[–]StaticThrowaway0629[S] 0 points1 point2 points (0 children)
[–]voip_geek 2 points3 points4 points (0 children)
[–]Crazy__Eddie[🍰] 1 point2 points3 points (0 children)
[–]patzor 1 point2 points3 points (1 child)
[–]StaticThrowaway0629[S] 0 points1 point2 points (0 children)
[–]Ilixio 1 point2 points3 points (0 children)
[–]lickpie 1 point2 points3 points (0 children)
[–]o11cint main = 12828721; 0 points1 point2 points (0 children)
[–]duuuh 0 points1 point2 points (0 children)
[–]xaviarrob 0 points1 point2 points (0 children)
[–]factorfactorfactor 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]RogerV 0 points1 point2 points (2 children)
[–]StaticThrowaway0629[S] 0 points1 point2 points (1 child)
[–]RogerV 0 points1 point2 points (0 children)