-
Notifications
You must be signed in to change notification settings - Fork 37
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
procedure definition rules are lagging function definition rules #578
Comments
I'll make a start on this.... |
Let's start with creating a function equivalent to procedure_006, as suggested by #595 |
will work on branch |
Creating function_300 as equivalent to procedure_006.... |
I looked at your changes on your branch and it looks good. The rest should hopefully be just about as easy. |
Some function rules that have no procedure equivalent (part 1)
|
creating procedure_100 as equivalent to function_002... |
creating procedure_101 as equivalent to function_003.... |
@jeremiah-c-leary : is there a rule that deals with |
so a space between |
for the first case you could use To find a corresponding rule that uses the base rules, I use this command: Then copy one of those rules to the new one. |
If you wanted, you could write a |
just realised that the suggestion of looking at the block rules is relevant for procedures, so it is looking like scrapping procedure_101 and making procedure_100 more like block_100.... |
Propose to create a procedure_101 that follows the idea of block_101, for consistency |
Now move onto case rules procedure_5xx inspired by block_5xx...
|
Creating procedure_200 equivalent to function_006.... |
Continuing populating procedure_2xx inspired by block_2xx...
|
Note: will need to go though the docs sections and add links from configuration pages back to rules, the link the other way is natural... |
function_012 does not seem to have a matching procedure rule?
|
function_009 and 010 do not seem to have procedure equivalents....
|
Reached a point where there are two things left...
|
If you look at the LRM:
You could add these rules:
It seems there is a never ending list of possible rules. |
I think this goes beyond the scope of the ticket :-) |
Let's look at procedure rules > 99 to look for rules added there for which there are missing function rules.... |
|
Looked at procedure_2xx:
|
Looked at procedure_4xx:
|
Looked at procedure_5xx:
|
So we can work on function rules:
|
With functions and procedures being nearly identical, I would opt for depricating 002 and 003 and making function_100 equivalent to procedure_100. Also, when I originally started this I just made up rules as I ran into issues in my code instead of having a solid plan for defining the rules. So if we could make the rules more coherent between function and procedure I am all for it. I did add a method to depricate rules. If you look at instantiation_030: 1
2 from vsg.depricated_rule import Depricated
3
4
5 class rule_030(Depricated):
6
7 def __init__(self):
8 Depricated.__init__(self, 'instantiation', '030')
9 self.message.append('Rule ' + self.unique_id + ' has been renamed to generic_map_007.') you would just copy that rule to procedure_002, change 030 to 002 and update the message on line 9. Maybe something like: Rule function_002 has been merged into rule function_100. I can not really think of a reason not to combine all of the single space checks into the single rule. |
Agree. Ideally with the same number to reduce confusion. I think it would be fine to skip function_200. Or we take this opportunity to align all the rules. That may be too much change though. Do you have an opinion? |
Agree |
Agree |
Too much change, leave for the future.... |
Working on function_201,202,203,204.... |
Working on function 502, 506 |
Working on rule 101 |
Working on rule 100 |
working on depricating function_002/003 |
done, PR raised |
Updating jcl style tests to accomidate additional function fules. 1) Updated fixed versions of two files
Comparison of rules shows there are some useful function definition rules that have no equivalent for procedure definitions
The text was updated successfully, but these errors were encountered: