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

[tcgc] adding linter rules for languages to tcgc #1147

Open
4 tasks done
iscai-msft opened this issue Jul 10, 2024 · 0 comments · May be fixed by #1208
Open
4 tasks done

[tcgc] adding linter rules for languages to tcgc #1147

iscai-msft opened this issue Jul 10, 2024 · 0 comments · May be fixed by #1208
Assignees
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@iscai-msft
Copy link
Contributor

iscai-msft commented Jul 10, 2024

Clear and concise description of the problem

Currently, we don't have a unified approach for throwing linter warnings that language SDKs will run into. Since we want these linter warnings to come up during definition time, we agree that it would be best to include these linter warnings in tcgc. That being said, we should still have a mapping for what warnings apply to which languages. This mapping will be internal, so we can figure out when to throw, and properly use information from scope to determine whether the issue has been fixed. One idea is to have an exclusion and inclusion list for languages

When generating azure, we want to run linter warnings for all languages, since it is within Azure guidelines to generate all major languages. When generating unbranded, we will only run language-specific warnings. This is because we don't want to force an unbranded person only generating c# to have to deal with python-specific warnings.

I'll start off by designing a framework that will allow easy mapping to languages, and easily allow languages to opt in or opt out of rules. One good rule of thumb is, if it's a warning log, it will be a good idea to move it to be an actual linter warning

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the TypeSpec repo
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@iscai-msft iscai-msft added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Jul 10, 2024
@iscai-msft iscai-msft self-assigned this Jul 10, 2024
@iscai-msft iscai-msft linked a pull request Jul 19, 2024 that will close this issue
@iscai-msft iscai-msft added this to the [2024] September milestone Aug 7, 2024
@markcowl markcowl removed this from the [2024] September milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants