Skip to content

feat: Add full warnings list, dont ouput warning if disabled #1838

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Dzuelu
Copy link

@Dzuelu Dzuelu commented Mar 8, 2025

Added full warning list w/ test for future warnings. Checked warning list before pushing diagnostic item.

Note: jsii-directive/struct-on-non-interface had nothing using it from what I could tell.

Fixes #2039


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Dzuelu
Copy link
Author

Dzuelu commented Apr 28, 2025

@mrgrain is there someone that can review and move this pr along?

Copy link
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @Dzuelu ! Please start by describing the problem you are trying to resolve or the feature you are trying to add. Ideally this would be in a separate issue.

I think I have a vague idea of what it is you want to do, but it will help if you describe it.

@Dzuelu
Copy link
Author

Dzuelu commented Jul 2, 2025

@mrgrain any updates needed?

Edit: Was too passive aggressive, you guys seem to have a ton of other projects to manage. Lmk if you need anything else from me.

Comment on lines +146 to +148
if (enabledWarnings['metadata/missing-readme']) {
this._diagnostics.push(JsiiDiagnostic.JSII_0003_MISSING_README.createDetached());
}
Copy link
Contributor

@mrgrain mrgrain Jul 2, 2025

Choose a reason for hiding this comment

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

That's not really maintainable for us. So easy to forget this check. We should always emit these warning but then filter them at the point of printing.

@mrgrain
Copy link
Contributor

mrgrain commented Jul 2, 2025

@Dzuelu Sorry I missed you creating the issue. Thanks for that, it helped me understand. Did an initial review of the PR. I don't think the approach will be maintainable. Because it is too easy to forget adding the check. Instead we should always emit these warnings (like we currently do). And then we can filter them at the point of printing.

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.

Unable to disable any warnings besides JSII_5018_RESERVED_WORD
2 participants