-
Notifications
You must be signed in to change notification settings - Fork 5
SK-2519: extract hard coded strings to constants and update linting r… #272
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
base: release/26.1.5
Are you sure you want to change the base?
Conversation
|
✅ Gitleaks Findings: No secrets detected. Safe to proceed! |
|
Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging. |
|
|
||
| import com.skyflow.utils.Constants; | ||
|
|
||
| @SuppressWarnings("checkstyle:MultipleStringLiterals") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we add SuppressWarnings annotation here ? What warnings are we suppressing ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as the file constains strings, and checkstyle linter will catch them, so added SuppressWarnings to avoid it catching
| <consoleOutput>true</consoleOutput> | ||
|
|
||
| <excludes>**/generated/**</excludes> | ||
| <excludes>**/generated/**,**/logs/**</excludes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we excluding logs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as log constains strings, and checkstyle linter will catch them, so excluded logs to avoid it catching
Why:
Following the Node SDK linting audit and refactor, this ticket focuses on applying the same linting standards and best practices across Java SDK v2.
The goal is to ensure consistent use of constants over hardcoded values across Java SDK v2, improving maintainability and readability.
Goal:
Update linting rules to discourage hardcoded literals where constants should be used.
Refactor existing code to replace hardcoded values with well-defined constants.