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

Add flag to indicate only @NullMarked code should be checked #1117

Merged
merged 6 commits into from
Dec 26, 2024

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Dec 25, 2024

Fixes #574

We add a new flag OnlyNullMarked to indicate that NullAway can only check code that is @NullMarked, and hence it is ok to omit the (previously required) AnnotatedPackages flag. We currently require exactly one of either AnnotatedPackages or OnlyNullMarked to be passed in; if both flags are omitted or both flags are passed, we fail.

As JSpecify and @NullMarked become more widely adopted, we may change the policy to allow neither flag to be passed (as NullAway already checks @NullMarked code out of the box). But for now, we require one of the flags to be passed, to avoid confusion.

Copy link

codecov bot commented Dec 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.17%. Comparing base (6d331c7) to head (210c4ad).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1117      +/-   ##
============================================
+ Coverage     88.14%   88.17%   +0.03%     
- Complexity     2234     2238       +4     
============================================
  Files            85       85              
  Lines          7237     7239       +2     
  Branches       1439     1439              
============================================
+ Hits           6379     6383       +4     
+ Misses          431      430       -1     
+ Partials        427      426       -1     

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

@msridhar msridhar merged commit 43054bb into master Dec 26, 2024
12 checks passed
@msridhar msridhar deleted the only-marked-code-flag-2024-12-25 branch December 26, 2024 04:01
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.

JSpecify and annotated packages option
2 participants