Professional Documents
Culture Documents
03 - Development Tools
03 - Development Tools
tools
Development tools
- Martin Fowler
Good practices of CI
Code coverage is a metric used to understand how much of the source code is tested.
How is code coverage
calculated?
- Function coverage
- Statement coverage
- Branches coverage
- Condition coverage
- Line coverage
Code format
- Indentation
- Spaces
- Lines breaks
- Comments style
- Etc.
Why?
It should be automatic.
Some code formatting tools
Java
- Google java format
https://github.com/google/google-java-format
JavaScript
- Prettier https://prettier.io
Scala
- Scalafmt https://scalameta.org/scalafmt/
Kotlin
- Klint https://ktlint.github.io
What is static code analysis ?
- Sonarqube https://www.sonarqube.org
JavaScript
- ESlint https://eslint.org
Java
- Checkstyle https://checkstyle.org/checks.html
Kotlin
- Detekt https://detekt.dev
- Klint https://ktlint.github.io
Git hooks
Git hooks are scripts that run automatically every time a particular event occurs in a Git
repository. They let you customize Git’s internal behavior and trigger customizable actions at
key points in the development life cycle.
Some uses:
- Enforce the organization’s standard git conventions
- Check if commit messages fulfill a standard
- Check commit author’s
- Branch protection
- Run tests before committing
- Preprocess code before committing
- Run Build
References
- Continuous integration:
- https://www.martinfowler.com/articles/continuousIntegration.html
- Code coverage:
- https://www.atlassian.com/continuous-delivery/software-testing/code-coverage
- Static code analysis:
- https://www.perforce.com/blog/sca/what-static-analysis
- https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis
- Git hooks:
- https://www.atlassian.com/git/tutorials/git-hooks
- https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks