Riverside-Software / sonar-openedge

CABL (Code Analyzer for ABL in SonarQube) - ABL ANTLR4 Parser
https://riverside-software.fr
GNU Lesser General Public License v3.0
63 stars 26 forks source link

Enhancement request: KeywordCase @ignorecase annotation #1137

Open ccecvb opened 3 months ago

ccecvb commented 3 months ago

Our coding standard uses lowercase. Unfortunately the AppBuilder does not respect the case preferences.

As a result all our Appbuilder .w sources are mixed case.

Making the rule understand which code is maintained by the AppBuilder is difficult, and probably not worth the effort.

A simple annotation @ignorecase, similar to @lowercase. and @uppercase. would help us eliminate those warnings.

sample code

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE assign_misc W-Win
PROCEDURE assign_misc :
/*------------------------------------------------------------------------------
  Purpose: Assign filter velden
  Parameters:  <none>
------------------------------------------------------------------------------*/

    do with frame {&misc_frame}:
        assign
            WZ-PRG-NAAM
            WZ-PARENT-NAME
            WZ-CUST-SCOPE
            WZ-CUST-KEY-VALUE.
    end.

end procedure.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI W-Win  _DEFAULT-DISABLE
PROCEDURE disable_UI :
/*------------------------------------------------------------------------------
  Purpose:     DISABLE the User Interface
  Parameters:  <none>
  Notes:       Here we clean-up the user-interface by deleting
               dynamic widgets we have created and/or hide
               frames.  This procedure is usually called when
               we are ready to "clean-up" after running.
------------------------------------------------------------------------------*/
  /* Delete the WINDOW we created */
  IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(W-Win)
  THEN DELETE WIDGET W-Win.
  IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME