Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of linting #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Lots of linting #1

wants to merge 1 commit into from

Conversation

giraudan
Copy link

@giraudan giraudan commented Jul 4, 2024

  • [fix] Made gradlew executable (chmod +x)
  • [lint] Weakened visibility on all elements of code where possible
  • [lint] Declared constants as final
  • [lint] Unicode escape sequence '\u26A0' can be replaced with '⚠'; unnecessary unicode escape sequences. The file encoding can handle the character without escaping it.
  • [lint] Specify type of lambda function parameters
  • [lint] Renamed constants using THIS_CASE
  • [lint] Moved region room management (generateLink, find and find methods) to inner class Listener
  • [lint] Exploded multi-expressions on separate lines for readability, debuggability and simplicity
  • [lint] Extracted throw statement from inside a try block
  • [lint] Catch Exception rather than Throwable (https://cwe.mitre.org/data/definitions/396, https://wiki.sei.cmu.edu/confluence/display/java/ERR08-J.+Do+not+catch+NullPointerException+or+any+of+its+ancestors)
  • [lint] Replaced big if/else if/if section with switch statement
  • [lint] import inner class rather than reference it by its parent class

- [fix] Made `gradlew` executable (`chmod +x`)
- [lint] Weakened visibility on all elements of code where possible
- [lint] Declared constants as `final`
- [lint] Unicode escape sequence '\u26A0' can be replaced with '⚠'; unnecessary unicode escape sequences. The file encoding can handle the character without escaping it.
- [lint] Specify type of lambda function parameters
- [lint] Renamed constants using THIS_CASE
- [lint] Moved region room management (`generateLink`, `find` and `find` methods) to inner class `Listener`
- [lint] Exploded multi-expressions on separate lines for readability, debuggability and simplicity
- [lint] Extracted `throw` statement from inside a `try` block
- [lint] Catch `Exception` rather than `Throwable` (https://cwe.mitre.org/data/definitions/396, https://wiki.sei.cmu.edu/confluence/display/java/ERR08-J.+Do+not+catch+NullPointerException+or+any+of+its+ancestors)
- [lint] Replaced big `if`/`else if`/`if` section with switch statement
- [lint] import inner class rather than reference it by its parent class
@ZetaMap
Copy link
Member

ZetaMap commented Jul 8, 2024

@phinner quel ton avis sur ce PR ?

@phinner
Copy link
Member

phinner commented Jul 8, 2024

💀 Oh I did not even noticed it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants