@@ -22,15 +22,15 @@ BEGIN {
2222 text= $0 ;
2323 # We just remove the # G-<id>: from the beginning of the text
2424 dummy= sub (/^ # G-[[:digit :] ]+ : /," " ,text);
25-
25+
2626 # Get the second of the 4 lines and ignore it, it's empty
2727 getline ;
28-
28+
2929 # Get the third of the 4 lines
3030 getline ;
3131 # Retrieve the severity field from the third line
3232 severity= substr ($3 ,2 ,length ($3 )- 2 );
33-
33+
3434 # Get the fourth and last of the 4 lines
3535 getline ;
3636 # If the char array was filled from the last iteration, we need to empty it here
@@ -42,7 +42,7 @@ BEGIN {
4242 char[ 6 ] = " " ;
4343 char[ 7 ] = " " ;
4444 char[ 8 ] = " " ;
45-
45+
4646 # The fourth line is a comma-separated list of characteristics - split them into an array
4747 no_of_characteristics= split ($0 ,characteristics," ," );
4848 for (i in characteristics) {
@@ -55,7 +55,7 @@ BEGIN {
5555 if (characteristics[ i] ~ /Reusability / ) {char[ 6 ] = " ✘" }
5656 if (characteristics[ i] ~ /Security / ) {char[ 7 ] = " ✘" }
5757 if (characteristics[ i] ~ /Testability / ) {char[ 8 ] = " ✘" }
58-
58+
5959 # If the characteristics value is something other than these 8 values, we output an error in the text so it'll be noticed
6060 if (! (characteristics[ i] ~ /Changeability / || \
6161 characteristics[ i] ~ /Efficiency / || \
@@ -66,16 +66,15 @@ BEGIN {
6666 characteristics[ i] ~ /Security / || \
6767 characteristics[ i] ~ /Testability / )) {text= " !!!CHARACTERISTIC ERROR!!!" }
6868 }
69-
69+
7070 # Output the fields of the markdown table in appendix B
7171 print old_id, new_id, text, severity, char[ 1 ] , char[ 2 ] , char[ 3 ] , char[ 4 ] , char[ 5 ] , char[ 6 ] , char[ 7 ] , char[ 8 ] ;
72-
72+
7373 # Special handling - between rule G-5040 and G-5050 we output the old rule 54 that is not mapped to any new rule
7474 if (new_id == " 5040" ) {
7575 print " 54 | n/a | Avoid use of EXCEPTION_INIT pragma for a 20nnn error. | Major | | | | | ✘ | | | " ;
7676 }
77-
77+
7878 # Done handling the 4 lines of one .md file. Next 4 lines will be from another .md file and be handled in the next iteration.
7979 }
8080}
81-
0 commit comments