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

INTL-231: Try checking for ignore lines within components #236

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

alanknight-wk
Copy link
Contributor

@alanknight-wk alanknight-wk commented Aug 29, 2023

Motivation

Ignore comments of the form

(mui.MenuItem()
                ..component = Dom.div.elementType
                // ignore_statement: intl_message_migration
               ..value = 'audit-info'

don't work because we start looking for the ignore comment ahead of the full expression. Try looking for them ahead of the line as well. We don't want it to trigger on other lines in the sequence of calls, e.g.

(mui.MenuItem()
                ..component = Dom.div.elementType
                // ignore_statement: intl_message_migration
               ..value = 'audit-info'
               ..title = 'some translateable string'

so only look a depth of one token back. That probably won't catch every condition, but it's better than nothing and shouldn't have too many bad cases if it only looks back one.

Changes

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aviary-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@alanknight-wk alanknight-wk changed the title Try checking for ignore lines within components INTL-231: Try checking for ignore lines within components Aug 29, 2023
@alanknight-wk
Copy link
Contributor Author

Tried this on audit, it seemed to fix the issues.

@alanknight-wk alanknight-wk marked this pull request as ready for review August 29, 2023 18:05
@robbecker-wf
Copy link
Member

QA+1 CI passes and testing manually shows that it works when adding the comment on the line before a string in the middle of a react component.

@robbecker-wf
Copy link
Member

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rmconsole6-wk rmconsole6-wk merged commit 3d74375 into master Aug 30, 2023
@rmconsole6-wk rmconsole6-wk deleted the ignore_lines_better branch August 30, 2023 00:51
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.

6 participants