/rpglelint

Lint ILE/RPG Programs

Primary LanguagePerl

NAME

rpglelint - Lint ILE/RPG Programs

SYNOPSIS

rpglelint [OPTIONS]... [FILE]...

DESCRIPTION

rpglelint will lint ILE/RPG programs

Mandatory arguments to long options are mandatory for short options too.

Options

-I, --include=glob

a file glob with directories that will be searched for included files, see INCLUDE DIRECTORIES

-f, --format=format

output format, either unix, or json

-Wname

set the warning name, see WARNINGS for a complete list of warnings

--dump

dump the parsed tree

--dump-file-only

dump the parsed tree, but exclude all included files

-h, --help

show help and exit

WARNINGS

Enable a warning by using -Wname, and disable it by using -Wno-name

Warnings enabled by -Wall, and -Wextra will be marked with [-Wall] and [-Wextra].

-Wglobal

warn about global declarations

-Windicator [-Wall]

warn about usage of indicators such as *INLR and *IN01

-Wparameter-mismatch [-Wall]

warn when a DCL-PROC does not match the DCL-PR

-Wqualified [-Wall]

warn when data structures are not qualified

-Wredefining-symbol [-Wall]

warn when a symbol is redefined

-Wsame-casing [-Wextra]

warn when a declaration is referenced with another casing than it is declared

-Wshadow

warn when a global declaration is shadowed by a local declaration

-Wsubroutine

warn when subroutines are used

-Wundefined-reference [-Wall]

warn when a symbol is referred but not declared

-Wunreachable-code

warn when code will never be reached

-Wunused-parameter [-Wextra]

warn when a parameter is never referred

-Wunused-procedure [-Wextra]

warn when a static procedure is never called

-Wunused-subroutine [-Wextra]

warn when a subroutine is never executed

-Wunused-variable [-Wextra]

warn when a declaration is never referred

-Wuppercase-constant [-Wall]

warn when a constant (defined with DCL-C) is not all uppercase

-Wuppercase-indicator [-Wall]

warn when an indicator (including *BLANK, *BLANKS, *CDMY, *CMDY, *CYMD, *DMY, *DATA, *EUR, *EUR, *HMS, *ISO0, *ISO, *JIS, *JOBRUN, *JUL, *LONGJUL, *MDY, *OFF, *OMIT, *ON, *USA, *USA, and *YMD) is not all uppercase

INCLUDE DIRECTORIES

The following will happen to included files when searched for existence:

The current files directory followed by all include directories will be scanned, from first added to last:

The checks are the following:

  • The filename will be checked

  • The filename will be lowercased

  • .rpgleinc will be appended to the filename

  • the filename will be lowercased and .rpgleinc will be appended

  • .mbr will be appended to the filename

  • the filename will be lowercased and .mbr will be appended

The first / in the filename will be substituted with .lib/, and the first , will be substituted with .file/.

The list above will now we checked again with the modified filename, before moving on to the next include directory.

ENVIRONMENT VARIABLES

The following environment variables are read and used by rpglelint as described.

RPGLELINT

options which are passed to rpglelint automatically

RPGLELINT_INCLUDE

a file glob with directories that will be searched for included files, see INCLUDE DIRECTORIES

SEE ALSO

rpglectags(1)

AUTHOR

Andreas Louv <andreas@louv.dk>.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.