78
Does C# (or any other languages) have an official style guide like python has pep8?
(programming.dev)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities [email protected]
Python is unique in formatting forms part of the syntax, every language has linters but its far more common for orgs to tweak the default rules .
For example Java has Checkstyle. The default rules 'sun checks' give a line length of 80, tabs are 4 spaces and everything is placed on a new line.
Junior devs inevitably want to trash the line length (honestly on 1080p monitors, 120 makes sense,).
There is always a new line/same line discussion (everyone perfers same line but there is always one die hard new line person).
The tab width discussion always has one junior dev complain that "tabs are better", as someone who started development on Visual Studio 6 where half the team double spaced, the other half used tabs. Those people get a lecture from me on how we can convert tabs to spaces but not the inverse so it will always be spaces if I am near.
With Checkstyle you upload the rule file as an artifact into your M2 repository. Then you can pull it down as a dependency when the checkstyle plugin runs.