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

Tighten backend linting #2106

Merged
merged 5 commits into from
May 2, 2023
Merged

Tighten backend linting #2106

merged 5 commits into from
May 2, 2023

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented May 2, 2023

This change is Reviewable

@imnasnainaec imnasnainaec added backend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release. labels May 2, 2023
@imnasnainaec imnasnainaec requested a review from jmgrady May 2, 2023 16:40
@imnasnainaec imnasnainaec self-assigned this May 2, 2023
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 15 of 15 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)


Backend/Startup.cs line 113 at r1 (raw file):

            {
                _logger.LogError("Must set {EnvName} environment variable to string of length {MinLength} or longer.",
                    secretKeyEnvName, minKeyLength);

Why is this method of formatting the message preferred here? I know that in Python, the templated literal (the previous method) is preferred.

Code quote:

                _logger.LogError("Must set {EnvName} environment variable to string of length {MinLength} or longer.",
                    secretKeyEnvName, minKeyLength);

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)


Backend/Startup.cs line 113 at r1 (raw file):

Previously, jmgrady (Jim Grady) wrote…

Why is this method of formatting the message preferred here? I know that in Python, the templated literal (the previous method) is preferred.

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2254

@codecov-commenter
Copy link

codecov-commenter commented May 2, 2023

Codecov Report

Patch coverage: 23.07% and project coverage change: -0.04 ⚠️

Comparison is base (1851c40) 48.97% compared to head (dfa1982) 48.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2106      +/-   ##
==========================================
- Coverage   48.97%   48.93%   -0.04%     
==========================================
  Files         296      296              
  Lines        9477     9478       +1     
  Branches      698      698              
==========================================
- Hits         4641     4638       -3     
- Misses       4274     4278       +4     
  Partials      562      562              
Flag Coverage Δ
backend 71.95% <23.07%> (-0.10%) ⬇️
frontend 32.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Backend/Controllers/LiftController.cs 54.90% <0.00%> (-0.37%) ⬇️
Backend/Services/InviteService.cs 0.00% <0.00%> (ø)
Backend/Services/LiftService.cs 93.82% <ø> (ø)
Backend/Services/PermissionService.cs 0.00% <0.00%> (ø)
Backend/Services/StatisticsService.cs 0.00% <0.00%> (ø)
Backend/Services/MergeService.cs 77.09% <75.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec enabled auto-merge (squash) May 2, 2023 18:34
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 9c840e3 into master May 2, 2023
@imnasnainaec imnasnainaec deleted the lint-backend branch May 2, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend maintenance Issue that makes it difficult to maintain the software or to upgrade installations post-release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants