Comments (7)
Would those rules always give a warning about ON-EXIT not being indented? If so, I think there should be an option about ON-EXIT.
Me, I think ON-EXIT should be at the same indentation level as DCL-PROC and END-PROC,
from vscode-rpgle.
Feel free to do either of these:
- a PR to add this line. Though a new PR will also require you to make a test case for this too.
- Please share a code snippet that used
ON-EXIT
and I can do the change and create a valid test.
Thanks!
Liam
from vscode-rpgle.
Code snippet:
//--------------------------------------------------------------------------------------------------
// Append a single quote. This procedure exists to make other code more readable.
//--------------------------------------------------------------------------------------------------
DCL-PROC Q;
DCL-PI Q VARCHAR(2048);
in_str VARCHAR(2048) CONST OPTIONS(*TRIM);
END-PI;
DCL-C C_QUOTE '''';
DCL-S is_abend IND INZ(*OFF);
DCL-S return_str LIKE(in_str);
return_str = %TRIM(C_QUOTE + in_str + C_QUOTE);
RETURN return_str;
ON-EXIT is_abend;
IF is_abend;
return_str = 'Liam does great work!';
ENDIF;
END-PROC Q;
from vscode-rpgle.
Looking good. Will be out in an upcoming release.
from vscode-rpgle.
from vscode-rpgle.
But for sure, code following ON-EXIT should be indented one level higher than ON-EXIT.
from vscode-rpgle.
@bmorris1 Maybe so. I actually like the way @JamesBrianHill provided it because it is part of that procedure and my brain easily associates it when the indentation is higher than the end-proc.
from vscode-rpgle.
Related Issues (20)
- The "Code for IBM i" Content Assist Fails to Display All Procedures from Includes, Hindering Code Organization and Readability HOT 1
- Column assist for RPGLE fixed-format removed? HOT 1
- Externally defined data structures always show as qualified
- Support `includePaths` from local `iproj.json` for local resolves
- Ability to generate SQL `create procedure/function` code from RPGLE
- /INCLUDE Path in Local Development Case Sensitivity Inconsistent HOT 1
- rpglint NPM package hasn't been updated since 0.17.5 HOT 5
- Strange behavior of data structure subfields name autocompletion HOT 15
- Use of SND-MSG and variable Msg causes linter issues. HOT 2
- Linter doesn't properly handle /undefine directive
- Refer to #308 about issue on resolving names of variables or data structures inside a source HOT 2
- Please add support for displaying Source sequence numbers
- Fixed format top bar - Idea
- Global lint configuration HOT 1
- New Casing Options
- Templates are marked as "No reference to definition." even when subfields of other data structures reference template subfields.
- An issue
- Linter marks program main procedure as unreferenced if ctl-opt is in copybook
- CompletionItemProvider locating currentprocedure in wrong source HOT 1
- No reference flags transferred from copybook to main source on wrong line HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-rpgle.