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

RPG Linter bug #361

Open
Gregory1701 opened this issue Jan 28, 2025 · 2 comments
Open

RPG Linter bug #361

Gregory1701 opened this issue Jan 28, 2025 · 2 comments
Assignees

Comments

@Gregory1701
Copy link

Gregory1701 commented Jan 28, 2025

The linter isn't handling it correctly when it uses a copy book that has a fixed format declaration in it. My linter gives "Procedure calls require brackets.' on the SQL Open, Read and Close statements. Here's a sample program to recreate the issue:

**FREE
/copy testcpy

EXEC SQL
  DECLARE UserInput CURSOR FOR
    SELECT field FROM file
    WHERE  field = :code
    ORDER BY field ASC;

EXEC SQL
  OPEN UserInput;

EXEC SQL
  FETCH NEXT FROM UserInput INTO :MyRpgVar
   For Read Only With NC;

Dow SQLSTATE = '00000';
  EXEC SQL
    FETCH NEXT FROM UserInput INTO :MyRpgVar;
ENDDO;

EXEC SQL
  CLOSE UserInput;

And the source for testcpy.rpgle:

     D stat            PR            10I 0 ExtProc('stat')
     D  filename                    *   value
     D  buf                            *   value

Context Version
Code for IBM i version 2.14.7
Visual Studio Code version 1.96.4
Operating System win32_x64
Active extensions
CL (vscode-clle): 1.1.7
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.5.0
Configuration Editing (configuration-editing): 1.0.0
Continue - Codestral, Claude, and more (continue): 0.8.66
Db2 for IBM i (vscode-db2i): 1.8.0
ESLint (vscode-eslint): 3.0.10
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.22.0
Extension Authoring (extension-editing): 1.0.0
GistPad (gistfs): 0.6.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
GitLab Workflow (gitlab-workflow): 5.35.3
IBM i Debug (ibmidebug): 2.0.2
IBM i Project Explorer (vscode-ibmi-projectexplorer): 2.12.0
JSON Language Features (json-language-features): 1.0.0
Jira and Bitbucket (Atlassian Labs) (atlascode): 3.2.3
Merge Conflict (merge-conflict): 1.0.0
NPM support for VS Code (npm): 1.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
Octo TD/OMS (octo-tdoms): 1.3.1241024
Postman (postman-for-vscode): 1.6.1
Prettier - Code formatter (prettier-vscode): 11.0.0
RPGLE (vscode-rpgle): 0.28.6
Server Ready Action (debug-server-ready): 1.0.0
Source Orbit (vscode-sourceorbit): 1.0.2
TODO Highlight (vscode-todo-highlight): 1.0.5
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
WSL (remote-wsl): 0.88.5
YAML (vscode-yaml): 1.15.0

Remote system
Setting Value
IBM i OS V7R5M0
Tech Refresh 4
CCSID Origin 37
Runtime CCSID 37
Default CCSID 37
SSHD CCSID ?
cqsh true
SQL Enabled
Source dates Disabled

Enabled features

/QOpenSys/pkgs/bin /usr/bin /QSYS.lib/ILEDITOR.lib /QSYS.LIB /QIBM/ProdData/IBMiDebugService/bin /QOpenSys/QIBM/ProdData/JavaVM/jdk80 /QOpenSys/QIBM/ProdData/JavaVM/jdk11 /QOpenSys/QIBM/ProdData/JavaVM/jdk17
bash attr GETNEWLIBL.PGM QZDFMDB2.PGM startDebugService.sh 64bit 64bit 64bit
find iconv
git setccsid
grep uname
ls
md5sum
sort
stat
tar
tn5250
Variants
{
  "american": "#@$",
  "local": "#@$",
  "qsysNameRegex": {}
}
@worksofliam worksofliam self-assigned this Jan 28, 2025
@worksofliam worksofliam transferred this issue from codefori/vscode-ibmi Feb 19, 2025
@worksofliam
Copy link
Contributor

@Gregory1701 Please also share your linter configuration.

@worksofliam
Copy link
Contributor

I have written an initial test case but it's passing. I will need that configuration to continue.

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

No branches or pull requests

2 participants