ShtukbaseStandard
package page→ /norms/code/code-refactoring.md

pages/norms/code/code-refactoring.md

30 lines, 1.2 KB. As a page.

  1. ---
  2. type: Page
  3. title: 'Settings: Code: smells after Fowler'
  4. functionLines: 60
  5. fileLines: 600
  6. classLines: 300
  7. minLines: 8
  8. maxParams: 5
  9. maxNesting: 4
  10. envyMin: 8
  11. distinctMin: 4
  12. exclude: []
  13. ---
  14. # Settings: Code: smells after Fowler
  15. Thresholds of the checks of the `code-refactoring` package. Change a number in the header and the checks will take it on the next run. If a key is absent, the default value is used.
  16. | Key | Default | What it means |
  17. |---|---|---|
  18. | `functionLines` | 60 | length of a function in lines of code (RF-R01) |
  19. | `fileLines` | 600 | length of a file in lines of code (RF-R02) |
  20. | `classLines` | 300 | length of a class or impl block in lines of code (RF-R02) |
  21. | `minLines` | 8 | length of a repeated block in significant lines (RF-R03) |
  22. | `maxParams` | 5 | number of a function's parameters (RF-R04) |
  23. | `maxNesting` | 4 | nesting depth of blocks (RF-R05) |
  24. | `envyMin` | 8 | accesses to a foreign object that make a method count as envious (RF-R06) |
  25. | `distinctMin` | 4 | distinct fields of a foreign object (RF-R06) |
  26. `exclude` is path masks from the project root that this package's checks do not read: `src/generated/**`, `legacy`, `**/*_pb.ts`. Shared exclusions for all code packages are on the page [/norms/code.md](/norms/code.md).