Add lint rules - #5
Conversation
| watchForChanges?: boolean; | ||
| serviceCodePath?: string; | ||
| /** | ||
| * when true , turn off the build check. |
There was a problem hiding this comment.
So far, I can't figure out from this comment nor the prior internal PR why this is needed. Can you provide more info? My gut feeling is that it's weird to have this option on the CLI, but maybe I'm missing something.
There was a problem hiding this comment.
Oh, this tells linters to skip checks, it doesn't skip the compiler's checker (which would be very weird but what I thought from the naming and a misread of the other PR). I think we should avoid using the terms check/checker for extra linting checks and keep it for compiler's critical analysis.
There was a problem hiding this comment.
yeah so this is actually maybe a bit weird as we don't have the concept of a linter anymore. Where do we draw the line where this flag would disable certain check?
Would it be that all the warning check or some decision on a per diagnostic basis.
If the 1st one maybe we can name --ignoreWarnings or something like that instead and still run all the checker but ignore the warnings at the end
If the 2nd one maybe have something like --skipOptionalChecks but should we really let that be disabled
There was a problem hiding this comment.
This feels more like it should be a setting for the level of reported checks (e.g. error, warning, info, debug), where essentially you report diagnostics at that level or of higher severity, with default to the lowest severity setting (or, perhaps, info), something like --diagnosticLevel
There was a problem hiding this comment.
This option if for skipping the lint checks which will be ran in the onBuild of emitter,
I am totally agreed to use the --diagnosticLevel to specify which diagnostics should be reported, as now all the lint rules are warnings .
There was a problem hiding this comment.
Looks good. Small request: could you squash and merge this and change the commit description while doing so to say what is changing in this OSS repo (instead of "add lint rules" which is not actually what this change does when looked at alone in this repo).
* add option `--diagnostic-level` to specify which level of messages should be reported * add docs for built-in types * improve & export semantic-walk lib Co-authored-by: jianye xi <jianyxi@microsoft.com>
Test variables
this is split from https://github.com/Azure/cadl-azure/pull/806 , need to commit to the core package first , then update the submodule in the internal repo