wiki/contributing/formatting/code.md

2.2 KiB

title description published date tags editor dateCreated
Code Standards true 2024-05-18T21:49:25.429Z markdown 2024-05-16T22:18:45.623Z

Use automated tools

When writing files which contribute to the Aux project, you should use our standard formatting and linting tools for your language. If there is not a tool designated on that page, you should use the tool which is most commonly used for your language and add it to our standard formatting and linting tools page.

If your formatter or linter in default configuration disagrees with anything on this page, follow your formatter or linter. Ignore whatever guideline or guidelines on this page your linter has a differing default on. {.is-warning}

You should not configure your tools to accept the behavior on this page if they do not by default. {.is-danger}

Naming

If your formatter or linter does not specify which naming convention to use please follow:

  • Classes, interfaces, and other types should use UpperCamelCase
  • Everything else, including functions and variables should use lowerCamelCase

Tabs

Because they allow different people to configure a different displayed width, please use a single tab for indentation.

Semicolons

Where semicolons are optional, please include them. Not doing so can cause ambiguity in some cases, which can be hard to spot.

...And your favorite formatting difference...

If you come across a formatting choice that isn't covered, please edit this page to add it. Please make any reasonable decision, it matters far more to be consistent than to be perfect.

If your formatting preference is one that tends to be flame-warred about, please remember to be nice, respectful, and follow the code of conduct.

If a formatting decision has been made against your preference, we're sorry. We still expect you to follow the decision for the sake of consistency. Please don't edit this page to change the decision. If you believe a decision on this page has been made in bad faith, please contact a member of the steering committee.