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

New Rule: implicit case default -- updated implementation #5

Merged
merged 12 commits into from
Mar 21, 2024

Conversation

ShreChinno
Copy link
Collaborator

Updated Implementation

  • Populates a list of LHS variables once encountered in always construct block
  • Checks if default case exists and sets bool to true
  • Goes through each declaration within case item and compares with LHS variable list
  • If does not exist, return fail, but if default exists, return pass, otherwise, return fail

Relevant Issues

@ShreChinno ShreChinno added the enhancement New feature or request label Mar 19, 2024
@ShreChinno ShreChinno self-assigned this Mar 19, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.51%. Comparing base (1e9c772) to head (3d48239).

❗ Current head 3d48239 differs from pull request most recent head 611c74f. Consider uploading reports for the commit 611c74f to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           implicit_case_default       #5      +/-   ##
=========================================================
- Coverage                  86.68%   86.51%   -0.18%     
=========================================================
  Files                        156      156              
  Lines                       8121     7965     -156     
=========================================================
- Hits                        7040     6891     -149     
+ Misses                      1081     1074       -7     

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

}

fn name(&self) -> String {
String::from("implicit_case_default")
}

fn hint(&self, _option: &ConfigOption) -> String {
String::from("Signal driven in `case` statement does not have a default value.")
String::from("Signal driven in `case` statement does not have a default value. Define a default case or implicitly define before `case` statement.")
Copy link
Owner

Choose a reason for hiding this comment

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

Hint is probably too long. Might need to wrap at 80 chars

@ronitnallagatla ronitnallagatla merged commit b3baa66 into implicit_case_default Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants