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

Bugfix/atr 347 dev px1050 string interpolation #459

Merged
merged 23 commits into from
Sep 20, 2022

Conversation

SENya1990
Copy link
Contributor

@SENya1990 SENya1990 commented Sep 20, 2022

Review and merge only after #457

Changes overview:

  • Added check of interpolation strings to PX1050 as part of the check for hard-coded strings
  • Extended PX1050 diagnostic - added a new diagnostic message for the scenario when a string passed to the localization methods/exception constructor is not a constant string field.
  • Removed flawed helper for argument to parameter mapping. Replaced it with arguments to parameters mapping utility.
  • Added unit tests for interpolation strings
  • Added symbol set for string type and refactored localization symbols
  • Added some utils
  • Refactored analyzers

…' into bugfix/ATR-347-dev-PX1050-string-interpolation
…thm with a better O-notation complexity and a correct resolution of mapped parameters that supports optional parameters and params parameter
…ization methods that are not string const fields
…dded support for new PX1050 scenario - report now strings passed to the localizaiton methods if they are not const fields.
<value>Hardcoded strings are not allowed as parameters for localization methods and PXException constructors. You should use string constants from the appropriate localizable messages class.</value>
</data>
<data name="PX1050Title_NonConstFieldString" xml:space="preserve">
<value>Strings that are not constant fields are not allowed as parameters for localization methods and PXException constructors. You should use string constants from the appropriate localizable messages class.</value>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@EAndrosova please review the new diagnostic message for the scenarios when string that is not a constant field is passed to the localization method or PXException constructor

@SENya1990 SENya1990 changed the base branch from dev to master September 20, 2022 14:12
@SENya1990 SENya1990 changed the base branch from master to dev September 20, 2022 14:13
@SENya1990 SENya1990 merged commit c91f795 into dev Sep 20, 2022
@SENya1990 SENya1990 deleted the bugfix/ATR-347-dev-PX1050-string-interpolation branch September 20, 2022 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants