# Code Linting, Formatting, Conventions, & Style
[[DevOps Tools]], [[Static Code Analysis (SCA) or Static Program Analysis]]
## Linting & Formatting
- [Lint (software) - Wikipedia](https://en.wikipedia.org/wiki/Lint_(software))
## Understand IDE
- https://en.wikipedia.org/wiki/Understand_(software)
## Formatting & Linting \^Python
## Formatting & Linting \^JavaScript
## Formatting & Linting \^Jav
## Formatting & Linting \^C\#
## Tools
- [[SonarQube]]
- [[ESLint]]
- [[Prettier]]
- [[Checkmarx]]
## Spaces or Tabs?
## Case Formats
- camelCase: twoWords
- snake_case: two_words
- kebab-case: two-words
- hyphen-case?
- PascalCase: TwoWords (or UpperCamelCase or CapitalCase)
- Slugify
- remove characters that don't encode well or aren't allowed
- spaces
- punctuation
- special chars
- etc.
- Title Case - Grammatical/formal way of titling something but not upper casing insignificant words like articles.
- Python style guide says underscores but Al Sweigart uses camelCase.
- A: I think I like underscores better. Seems more readable, about the same or maybe even easier to type. And I think it’s easier to grok since variable names are case sensitive so you don’t have to scan hard to make sure you know which letters are upper case or if an l is an L etc. underscores\_for\_the\_win!
## Quotes
- ‘ Or “ for strings?
- A: Single quotes - easier to type and Al Sweigart does it
## Column / Character Width / Wrapping
- Vs soft word wrap, e.g. in VS Code that wraps automatically which seems to work well for me. Not sure what actual best practice is.
- Have heard that you should break lines at no more than either 72 or 80 characters wide?
- There are also IDE settings that let you do this automatically or on demand. Bbedit has command-\\ builtin. VS Code has an extension called, “Rewrap” that enables hard word wrap.
## Blank Lines
Useful for creating partitions in code for human understanding
## Comments
- Multiline
- Ways to comment that can auto document and or [[OpenAPI]] swagger, etc.