Skip to content

style: enable MissingSwitchDefault in checkstyle #5176

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

Closed

Conversation

BamaCharanChhandogi
Copy link
Member

related #5119

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

codecov-commenter commented May 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 38.58%. Comparing base (9eaa2bb) to head (69877ba).

Files Patch % Lines
.../java/com/thealgorithms/stacks/PostfixToInfix.java 0.00% 16 Missing ⚠️
src/main/java/com/thealgorithms/misc/Sort012D.java 0.00% 5 Missing ⚠️
src/main/java/com/thealgorithms/sorts/DNFSort.java 0.00% 4 Missing ⚠️
...astructures/hashmap/hashing/MainCuckooHashing.java 0.00% 3 Missing ⚠️
...lgorithms/datastructures/hashmap/hashing/Main.java 0.00% 2 Missing ⚠️
...va/com/thealgorithms/strings/ValidParentheses.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5176      +/-   ##
============================================
- Coverage     38.60%   38.58%   -0.03%     
  Complexity     2378     2378              
============================================
  Files           516      516              
  Lines         15391    15403      +12     
  Branches       2957     2958       +1     
============================================
+ Hits           5942     5943       +1     
- Misses         9163     9174      +11     
  Partials        286      286              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 60 to 62
System.out.println("Unexpected value: " + a[mid]);
mid++;
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System.out.println("Unexpected value: " + a[mid]);
mid++;
break;
throw new IllegalArgumentException("Unexpected value: " + a[mid]);

Comment on lines 35 to 37
System.out.println("Unexpected value: " + a[mid]);
mid++;
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System.out.println("Unexpected value: " + a[mid]);
mid++;
break;
throw new IllegalArgumentException("Unexpected value: " + a[mid]);

Comment on lines 33 to 35
// Optional: Handle unexpected characters if needed
System.out.println("Unexpected character: " + c);
return false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Optional: Handle unexpected characters if needed
System.out.println("Unexpected character: " + c);
return false;
throw new IllegalArgumentException("Unexpected character: " + c);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert all of the non-necessary changes and create a new PR with them.

@vil02 vil02 changed the title Style: enable MissingSwitchDefault in checkstyle style: enable MissingSwitchDefault in checkstyle May 26, 2024
@BamaCharanChhandogi
Copy link
Member Author

ok

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