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

Extra prefix/suffix rules for package contents #690

Open
imd1 opened this issue Nov 19, 2021 · 3 comments
Open

Extra prefix/suffix rules for package contents #690

imd1 opened this issue Nov 19, 2021 · 3 comments
Assignees

Comments

@imd1
Copy link
Contributor

imd1 commented Nov 19, 2021

Currently prefix/suffix rules for a number of items (constants, types and sub types) are applied whether they are defined inside a package (normally in a separate file) or inside architectures or wherever

Let's just consider constants for illustration

Propose taking the current single rule pair e.g. constant_015/constant_600 and replacing/supplementing them with multiple rules according to where they are defined, which would take precedence of the single rules.

e.g. constant_601 = prefix for constants inside packages
constant_602 = suffix for constants inside packages
constant_015 = prefix for constants outside packages
constant_600 = suffix for constants outside packages

OR depreciating the single rules in favor of a comprehensive set of mutliple rules

@jeremiah-c-leary jeremiah-c-leary added this to Incomming in Issue Triage via automation Jan 1, 2022
@jeremiah-c-leary
Copy link
Owner

What would you think of adding an option to the existing rules instead of a separate rule. Something like package_prefixes.

{
  "rule": {
    "constant_015": {
      "indentSize": 2,
      "phase": 7,
      "disable": true,
      "fixable": false,
      "severity": "Error",
      "prefixes": [
        "c_"
      ],
      "package_prefixes": [
        "pc_"
      ]
    }
  }
}

Not sure that option is better than a separate rule.

Thoughts?

--Jeremy

@jeremiah-c-leary jeremiah-c-leary moved this from Incomming to User Feedback in Issue Triage Jan 1, 2022
@jeremiah-c-leary jeremiah-c-leary removed this from User Feedback in Issue Triage Feb 1, 2022
@jeremiah-c-leary jeremiah-c-leary self-assigned this Feb 1, 2022
@imd1
Copy link
Contributor Author

imd1 commented Feb 6, 2022

I'm struggling to remember why I wanted this enhancement, but I think it relates to my prefix/suffix auto correction scripting. It would be useful for the error log to tell me whether the violation occurred in a package rather than an architecture, and so I do want a different rule number for each

@jeremiah-c-leary
Copy link
Owner

I know at my work a manager wanted to have generics in packages to have a different prefix than one "locally" declared in an architecture.

You could see someone wanting to have different prefixes based on scope: architecture, process, block, package, package_body, procedure, function, etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Deferred
Development

No branches or pull requests

2 participants