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

Linting revamp #20830

Merged
merged 9 commits into from May 19, 2023
Merged

Linting revamp #20830

merged 9 commits into from May 19, 2023

Conversation

PunkPun
Copy link
Member

@PunkPun PunkPun commented Apr 29, 2023

This PR does quite a lot. I split everything neatly into commits.

TLDR:

  • CI now fails on utility warnings
  • Reduced the severity of translation errors to warnings
  • Unified error formatting
  • Improved a few lint tests to both be clearer and provide more info

@PunkPun PunkPun added this to the Next Release milestone Apr 29, 2023
Makefile Outdated Show resolved Hide resolved
abcdefg30
abcdefg30 previously approved these changes Apr 29, 2023
abcdefg30
abcdefg30 previously approved these changes Apr 29, 2023
Makefile Outdated Show resolved Hide resolved
OpenRA.Mods.Common/Lint/CheckActorReferences.cs Outdated Show resolved Hide resolved
@@ -33,7 +33,7 @@ void ILintRulesPass.Run(Action<string> emitError, Action<string> emitWarning, Mo
var traitName = traitInfo.GetType().Name;
traitName = traitName.Remove(traitName.Length - 4);
var locations = traitLocation.SystemActors.ToString().Replace(", ", " or ");
emitError($"{traitName} does not belong on {actorInfo.Key}. It is a system trait meant for {locations}.");
emitError($"`{traitName}` does not belong on `{actorInfo.Key}`. It is a system trait meant for {locations}.");
Copy link
Member

Choose a reason for hiding this comment

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

Likewise here.

Copy link
Member Author

Choose a reason for hiding this comment

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

and we definitely don't add those to multiple word fields

OpenRA.Mods.Common/Lint/CheckTranslationReference.cs Outdated Show resolved Hide resolved
@Mailaender Mailaender merged commit ade27ad into OpenRA:bleed May 19, 2023
3 checks passed
@Mailaender
Copy link
Member

Changelog

@PunkPun PunkPun deleted the lint branch May 19, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants