Comments (28)
Hello,
I think I have the same issue with trigger declaration:
`ERROR: Unable to parse file
ERROR: Parse error at line 1 column 18:
--> CREATE OR REPLACE TRIGGER TRIG_TOOLS_IDX
2: BEFORE INSERT or UPDATE ON TOOLS_IDX
3: FOR EACH ROW
4:
5: begin
6:
7: if inserting then
8:
9: :new.created := sysdate;
10: :new.created_by := user;
11: :`
Trigger is not implemented ?
from zpa.
Hi. Thanks for the interest.
I don't remember why I didn't add the "timestamp with precision" syntax. Anyway, this must be fixed. I'll fix this soon, thanks!
About the GRANT statement... The DDL support needs to be improved. I'll try to improve this in the next few days.
This plugin doesn't implement any well-known ruleset. For now it's just a collection of the most valuable coding rules suggested by my coworkers, in our opinion.
from zpa.
Hi,
First and foremost - I forgot to thank you for making this public. I'm a DBA so can't contribute much to the code myself, but can test and report issues as I find them - doing a POC of SonnarQube for SQL and PL/SQL.
GRANT is not a DDL - it's a DCL :)
I will wait for the fixed version in order to test (it actually failed to parse on the first file - and I have thousands of files to test, so... will follow this issue before I can test again.
Thanks,
Mor
from zpa.
Hi,
Now I have a parse error on collections (varray in this case) (defined within a package):
ERROR: Parse error at line 73 column 29:
70: 4);
71:
72: type t_tab_rec is record (table_name varchar2(30), connecting_table varchar2(30), connecting_column_name varchar2(30));
--> type t_tab_varray is varray(6) of t_tab_rec;
74:
75: vTableArray t_tab_varray;
76:
77: cursor order_ids_to_archive_crs is
78: select ORDER_ID
79: from TMP_ARCHIVE_ORDER_IDS
80: order by ORDER_ID;
81:
82: function t_tab_rec_ctor(itable_name in varchar2, iconnecting_table in
Regards,
Mor
from zpa.
Hi @pyrocks.
VARRAY declarations should work now. Please test the latest build.
Thanks!
from zpa.
Hi,
I now ran the updated plugin on ALL of my SQL files, not just one.
As you would expect - there are still MANY parsing errors, tried to gather all of them here (in short):
--> select ' ' || listagg(column_name,',') within group (order by column_id asc) --the within group is not recognized
--> and table_name not like 'TMP@%' escape '@' -- i assume the escape clause is not recognized
--> where current of steps_to_loop_crs;
--> ' ' || trim(both '''' from vRegisterNum) || '' || chr(10) || --trim extended syntax
--> alter table subspps rename to subspps_old; -- alter table not supported?
--> vFlag = false; --vFlag is a boolean variable
--> execute immediate q'!CREATE USER BLUTO -- q string notation not supported ?
--> CREATE TABLE EPAYMENT_BANK_PROVISIONING( -- create table not supported?
--> LEFT OUTER JOIN CURRENCIES ON AC.CURRENCY_ID = CURRENCIES.CURRENCY_ID -- I have also seen errors on RIGHT OUTER JOIN, INNER JOIN, FULL OUTER JOIN and CROSS JOIN (OUTER is an optional word - can well be LEFT JOIN, RIGHT JOIN and FULL JOIN and INNER is also optional can be just JOIN) - basically all ANSI JOIN syntax needs to be supported
--> RETURNING ACTIVITY_REASON_ID INTO oNewID; -- on a single row update/insert
--> merge into ar_INVOICE_ITEM ARCG -- merge not recognized (it's a DML)
--> unpivot (Day_template for day_name in (DAY_TEMPLATE_ID_SUNDAY, DAY_TEMPLATE_ID_MONDAY , DAY_TEMPLATE_ID_TUESDAY, DAY_TEMPLATE_ID_WEDNESDAY, DAY_TEMPLATE_ID_THURSDAY, DAY_TEMPLATE_ID_FRIDAY, DAY_TEMPLATE_ID_SATURDAY)) --unpivot and I assume also pivot are not recognized
--> ORDER BY DUE_DATE, SDD_SEQ_TYPE, DD_REQUEST_ID,REJECT_COUNTER) -- not sure what the problem is here, maybe the ending brackets?
--> CREATE OR REPLACE TYPE t_in_list_tab AS TABLE OF VARCHAR2 (4000); --not within a package
--> CREATE USER CARDS_FACTORY_WITH_DATA
--> INSERT INTO CRM_FIELD_TYPES VALUES('1','number(10)'); -- plain DML not in a procedure
--> CREATE OR REPLACE TYPE "IN_LIST_CM_ELEMENTS_REC" FORCE as object -- not in a package
--> exit partitioned_loop when partitions_crs%notfound; -- loop is defined with <<partitioned_loop>>
--> FORALL indx in l_file_ids.FIRST..l_file_ids.LAST
--> after update or insert of OBJECT_ID, OBJECT_TYPE -- in trigger
--> VALUE => INTERVAL '1' HOUR); -- in a call to a procedure which accepts an INTERVAL datatype
--> SET DEFINE OFF; -- sqlplus commands, all SET should be supported (serverout on etc)
--> DELETE FROM EXP_JOB_BULK_STEP_PARAMS where PARAMETER_STEP_ID = 451; -- DML not within a procedure
--> DROP VIEW CMODS_DAILY_VIEW; -- drop DDL
--> CREATE OR REPLACE DIRECTORY -- directory objects
--> CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "FileHandler" AS -- JAVA
--> PROCEDURE delete (p_conn IN OUT NOCOPY UTL_TCP.connection, -- i guess it's the procedure name which conflicts with the DML? it's a procedure within a package
16: CREATE OR REPLACE FUNCTION xp_hash (idata IN VARCHAR2, ihashFunc IN VARCHAR2, ohash OUT RAW)
17: RETURN BINARY_INTEGER AS
18: EXTERNAL
--> LIBRARY svutils
--> group by name, type --after connect by clause
--> PARALLEL_ENABLE -- on the definition of a function
--> @"C:\Oracle\AL32UTF8\MAG52_FIXED_NAMES\After Name Change\Functions\FN_ArrayToTable.sql" --sqlplus @ syntax
--> var counter number; -- sqlplus var sytnax
--> after logon on database -- in system event trigger
--> truncate table ACCESSORIES; -- DDL not within a procedure
--> $IF $$debug_on $THEN -- conditional compilation
80: model -- the model sql syntax
--> return updated rows
82: dimension by ( 0 as position )
83: measures ( c || v_Delimiter as val )
84: rules upsert
85: ( val
86: [ for position
87: from 1
88: to length(
--> from XMLTABLE (xmlnamespaces('http://schemas.xmlsoap.org/soap/envelope/' as "soap"), 'EXPORT_INFO' -- all the XML functions and syntax...
39: for i in 1..aSrvFam(iServersFamily).count loop
40: INSERT INTO DLL_FILES(CLUSTER_ID, DLL_NAME, PRIORITY)
--> VALUES (iClusterID, aSrvFam(iServersFamily)(i), i); -- multi dimensional collection
10: declare
11:
--> BEGIN -- in a definition of a trigger the declare CAN be empty, I assume that's the problem here
--> RESULT_CACHE RELIES_ON (environments, params) -- function definition
--> CONNECT_BY_ROOT customer_id lower_customer_id -- of an hierarchical query
--> iFirstPartition IN DATE := date'2011-01-01' ); -- date assignment
--> (select PTBILLING_LAYOUTS_HISTORY., PT_BILLING_LAYOUT_ROWS.PTLAYOUT_ROW_ID , --perhaps alias._ (alias dot asterisk) is not supported
--> after insert or update or delete of REFERENCE_TABLE_FIELD_IS_OUT on REFERENCE_TABLES_FIELDS -- in trigger definition
If you need clarifications regarding any of the errors - let me know.
Good Luck :)
Mor
from zpa.
Hi.
Thanks for the examples.
I'm parsing more than 10 million lines of code, but mostly Oracle Forms 6i code (Oracle8 syntax) and database code originally written for Oracle 9i/10g. That's why I didn't implement the most of "modern" syntaxes yet and the support for SQL*Plus commands/DDL/DCL is very poor.
I made this "todo list" based on the problems you found:
- LISTAGG syntax
- full LIKE syntax
- WHERE CURRENT OF in update/delete statements
- full TRIM syntax
- ALTER TABLE
- character literal with user defined delimiter
- CREATE TABLE
- RETURNING INTO
- MERGE
- PIVOT/UNPIVOT
- CREATE TYPE
- CREATE USER
- DML statements in SQL*Plus scripts
- EXIT from labeled loop
- FORALL
- "insert of" or "delete of" in trigger declaration. The official documentation is wrong, because it doesn't mention this possibility
- Interval literals
- SET command in SQL*Plus
- DROP statements
- CREATE DIRECTORY
- CREATE JAVA
- "PROCEDURE delete". In the Oracle 11g doc "DELETE" is listed as a reserved keyword (words that can't be used as as identifiers), but in the Oracle 12c doc "DELETE" is not a reserved keyword anymore.
- external library in function declaration
- "group by" after "connect by"
- PARALLEL_ENABLE and RESULT_CACHE
- Execute SQL*Plus script with @
- var syntax in SQL*Plus
- complete trigger syntax ("instead of", compound and system triggers)
- TRUNCATE TABLE
- conditional compilation
- model clause
- review XML syntax
- usage of multi dimensional collection
- empty declare in trigger declaration
- CONNECT_BY_ROOT operador in hierarchical query
- the word "date" in a date literal is case insensitive
- support aliases in ANSI JOIN syntax
- ORDER BY without an explicit SELECT clause, e.g. "(SELECT * FROM DUAL) ORDER BY 1"
- subqueries in ANSI JOIN, e.g. "SELECT DUAL.* FROM DUAL JOIN (SELECT DUMMY FROM DUAL) ON (1 = 1)"
- named parameters in OPEN statement
- PRAGMA RESTRICT_REFERENCES
But I would like more information about these:
--> vFlag = false;
Shouldn't it be "vFlag := false"? Maybe GitHub screwed up the formatting.
--> LEFT OUTER JOIN CURRENCIES ON AC.CURRENCY_ID = CURRENCIES.CURRENCY_ID
ANSI JOINs are supported but I think there's a bug related to alias usage. Could you confirm if the AC is an alias (like, "OTHER_TABLE AC LEFT OUTER JOIN CURRENCIES (...)"?
--> ORDER BY DUE_DATE, SDD_SEQ_TYPE, DD_REQUEST_ID,REJECT_COUNTER)
I'm not sure too. Could you share the surrounding lines or even the full query? You can replace the tables and columns names to some dummy name, as I am only interested in the syntax. If you prefer, send it to me privately (felipebzorzo AT gmail DOT com).
--> (select PTBILLING_LAYOUTS_HISTORY., PT_BILLING_LAYOUT_ROWS.PTLAYOUT_ROW_ID ,
The alias.* syntax is supported. A simple "select ptbilling_layouts_history.*, pt_billing_layout_rows.ptlayout_row_id from pt_billing_layout_rows" is parsed correctly.
Could you confirm if the code is really PTBILLING_LAYOUTS_HISTORY**.,** instead of PTBILLING_LAYOUTS_HISTORY**.*,**?
from zpa.
Hi,
I really like the TODO list, makes it super easy to follow.
As to your questions:
--> vFlag = false;
Shouldn't it be "vFlag := false"? Maybe GitHub screwed up the formatting.
[Mor: You are correct - indeed a bug in my file :) ]
--> LEFT OUTER JOIN CURRENCIES ON AC.CURRENCY_ID = CURRENCIES.CURRENCY_ID
ANSI JOINs are supported but I think there's a bug related to alias usage. Could you confirm if the AC is an alias (like, "OTHER_TABLE AC LEFT OUTER JOIN CURRENCIES (...)"?
[Mor: Yes the problem seems to be with the aliases, I noticed it after I already posted]
--> ORDER BY DUE_DATE, SDD_SEQ_TYPE, DD_REQUEST_ID,REJECT_COUNTER)
I'm not sure too. Could you share the surrounding lines or even the full query? You can replace the tables and columns names to some dummy name, as I am only interested in the syntax. If you prefer, send it to me privately (felipebzorzo AT gmail DOT com).
[Mor: Here is the full DML which is not parsed correctly with dummy names (ps in the parsing error the comment does not appear. I assume all comments are removed/ignored) :
INSERT INTO TABLE1 (COLUMN1, COLUMN2, COLUMN3)
(SELECT COLUMN1, COLUMN2, 0 FROM
((SELECT COLUMN1, COLUMN4, COLUMN5,COLUMN6, COLUMN2
FROM TABLE2
WHERE COLUMN7 = vParam1 AND
(COLUMN8 = 4 Or COLUMN8 = 11) AND
COLUMN5 = 'SOME_VALUE' AND
((COLUMN4 <= vParam2) OR (vParam3 = 1 AND COLUMN6 > 0 ))
UNION
SELECT COLUMN1, COLUMN4, COLUMN5,COLUMN6, COLUMN2
FROM TABLE2
WHERE COLUMN7 = vParam1 AND
(COLUMN8 = 4 Or COLUMN8 = 11) AND
COLUMN5 = 'OTHER_VALUE' AND
((COLUMN4 <= vParam4)OR(vParam3 = 1 AND COLUMN6 > 0 ))
)
ORDER BY COLUMN4, COLUMN5, COLUMN1,COLUMN6)--some comment
WHERE ROWNUM < vParam5);
--> (select PTBILLING_LAYOUTS_HISTORY., PT_BILLING_LAYOUT_ROWS.PTLAYOUT_ROW_ID ,
The alias.* syntax is supported. A simple "select ptbilling_layouts_history., pt_billing_layout_rows.ptlayout_row_id from pt_billing_layout_rows" is parsed correctly.
Could you confirm if the code is really PTBILLING_LAYOUTS_HISTORY., instead of PTBILLING_LAYOUTS_HISTORY.,?
[Mor: no, the code is with asterisk, github removed it for some reason.
The query comes right after INNER JOIN, parsing error looks like. note there's an empty line in between the INNER JOIN and the actual query - don't know if it plays a role in the error or not.]
"INNER JOIN
--> (select a.*, b.c, ... )"
Let me know if you need more info.
Mor
from zpa.
P.S.
The procedure named delete (within a package) compiles and works on 11g as well - so it's not just a 12c thing.
The code is actually from here - which I assume works on (at least) 10g as well:
https://oracle-base.com/articles/misc/ftp-from-plsql
Regards,
Mor
from zpa.
Thanks again. :-)
I can reproduce all errors now. I've updated the todo list.
--> ORDER BY DUE_DATE, SDD_SEQ_TYPE, DD_REQUEST_ID,REJECT_COUNTER)
I can reproduce this with a simple (SELECT * FROM DUAL) ORDER BY 1. The parser isn't recognizing the "order by" without an explicit SELECT clause.
--> (select PTBILLING_LAYOUTS_HISTORY.*, PT_BILLING_LAYOUT_ROWS.PTLAYOUT_ROW_ID ,
There's a bug with subqueries in ANSI JOIN. I can reproduce with SELECT DUAL.* FROM DUAL JOIN (SELECT DUMMY FROM DUAL) ON (1 = 1).
By the way, the Oracle documentation is a funny thing. The words "DELETE" and "TABLE" are both listed as reserved keywords in the 10g/11g documentation, but "delete" can be used as a procedure/funcion name and "table" isn't accepted. The documentation isn't completely correct. ;-)
from zpa.
As for the documentation - I couldn't agree more. Just this week I opened an SR which talks about the documentation not matching actual behavior in 12c's alter system.
I'd be lucky if it ever gets fixed though...
Keep up the good work - I'm here to assist you if you need.
Mor
from zpa.
btw - what is the second artifact for (sslr-plsql-toolkit-1.0-SNAPSHOT.jar) ?
from zpa.
Hi,
Thanks felipebz!! Your work is really great!
I was working locally with the code in order to evaluate (and help to fix) what is missing in the grammar.
It seems that your new TODO list covers almost everything i have found.
I would like to help, however I'm afraid because you are working really fast!
from zpa.
Hi,
I have added support aliases on ANSI joins on my local copy. As Here is what I have changed:
First, I have enhanced DML_TABLE_EXPRESSION rule to not match some keywords that cannot be used as an alias:
b.rule(DML_TABLE_EXPRESSION_CLAUSE).is( b.firstOf( b.sequence(LPARENTHESIS, SELECT_EXPRESSION, RPARENTHESIS), b.sequence(TABLE_REFERENCE, b.nextNot(LPARENTHESIS)), OBJECT_REFERENCE), b.optional(b.sequence(b.nextNot(b.firstOf(PARTITION, CROSS, USING, FULL, NATURAL, INNER, LEFT, RIGHT, OUTER, JOIN)), ALIAS )));
Second, I have switched TABLE_REFERENCE for DML_TABLE_EXPRESSION_CLAUSE on JOIN_CLAUSE, OUTER_JOIN_CLAUSE and INNER_CROSS_JOIN_CLAUSE:
` b.rule(INNER_CROSS_JOIN_CLAUSE).is(b.firstOf(
b.sequence(b.optional(INNER), JOIN, DML_TABLE_EXPRESSION_CLAUSE, ON_OR_USING_EXPRESSION),
b.sequence(
b.firstOf(
CROSS,
b.sequence(NATURAL, b.optional(INNER))),
JOIN, DML_TABLE_EXPRESSION_CLAUSE)
));
b.rule(OUTER_JOIN_CLAUSE).is(
b.optional(QUERY_PARTITION_CLAUSE),
b.firstOf(
b.sequence(OUTER_JOIN_TYPE, JOIN),
b.sequence(NATURAL, b.optional(OUTER_JOIN_TYPE), JOIN)),
b.sequence(DML_TABLE_EXPRESSION_CLAUSE, b.optional(QUERY_PARTITION_CLAUSE), b.optional(ON_OR_USING_EXPRESSION)
));
b.rule(JOIN_CLAUSE).is(DML_TABLE_EXPRESSION_CLAUSE, b.oneOrMore(b.firstOf(INNER_CROSS_JOIN_CLAUSE, OUTER_JOIN_CLAUSE)));`
Last, I have added several new tests:
` @test
public void matchesSimpleJoinWithTableAlias() {
assertThat(p).matches("foo f join bar b on f.a = b.a");
}
@Test
public void matchesInnerJoinWithTableAlias() {
assertThat(p).matches("foo f inner join bar b on f.a = b.a");
}
@Test
public void matchesJoinWithUsingWithTableAlias() {
assertThat(p).matches("foo f join bar b using (a)");
}
@Test
public void matchesInnerJoinWithUsingWithTableAlias() {
assertThat(p).matches("foo f inner join bar n using (a)");
}
@Test
public void matchesNaturalJoinWithTableAlias() {
assertThat(p).matches("foo f natural join bar b");
}
@Test
public void matchesFullJoinWithTableAlias() {
assertThat(p).matches("foo f full join bar b on f.a = b.a");
}
@Test
public void matchesFullJoinWithUsingWithTableAlias() {
assertThat(p).matches("foo f full join bar b using (a)");
}
@Test
public void matchesRightJoinWithTableAlias() {
assertThat(p).matches("foo f right join bar b on f.a = b.a");
}
@Test
public void matchesLeftJoinWithTableAlias() {
assertThat(p).matches("foo f left join bar b on f.a = b.a");
}
@Test
public void matchesJoinSubqueryWithTable() {
assertThat(p).matches("(select a from foo) f join bar b on f.a = b.a");
}
@Test
public void matchesJoinTableWithSubquery() {
assertThat(p).matches("foo join (select a from bar) b on foo.a = b.a");
}
}
`
from zpa.
Hi, @nmorais. It sounds great. Could you make a pull request with your changes? It will be easier to review.
from zpa.
Hi,
I have tried, it seems i dont have permission.
To be more specifc, i get this error:
`git.exe push --progress "origin" aliases-on-ansi-joins
remote: Permission to felipebz/sonar-plsql.git denied to nmorais.
fatal: unable to access 'https://github.com/felipebz/sonar-plsql.git/': The requested URL returned error: 403
`
The procedure was:
- Cloned repository
- Created a branch for this fix
- Pushed the branch
- If it was succeedded then: create pull request
from zpa.
@pyrocks the sslr-plsql-toolkit is a standalone app to test the parser without running a full analysis in SonarQube. It can be used to see how the syntax is parsed, useful when creating new coding rules.
@nmorais you're almost there ;-) Your procedure is correct, but before everything else you have to fork my repository and clone yours (https://github.com/nmorais/sonar-plsql). Then you can make the changes in your repo and create a pull request from there.
from zpa.
@felipebz, thanks for the tip!
Pull request done!
from zpa.
@felipebz, I got a problem after commit: Complete LIKE syntax 2d77364
The plugin got stuck at a file until the build timed out (30 minutes).
Do you have any tips on how to troubleshoot this kind of problema?
from zpa.
@felipebz I am trying out your pl/sql sonar plgin and it looks promising!
There is one issue that prevents me from anayzing certain packages.
Someone has been using named bind variables for opening cursors and these give a parser error:
ERROR: Unable to parse file: /home/jochem/sonarexperiment/APPL_RELATIE2/src/adres.pkb
ERROR: Parse error at line 389 column 32:
--> open c_postcode ( b_postcode => p_postcode, b_huisnr => p_huisnr );
Are you able too fix this anytime soon? Would be great!
from zpa.
Thanks @J-Budding. It's fixed now.
from zpa.
@felipebz Thanks for the quick fix fir the open cursor statement!
Now I have a few 4 more parsing issues, they might already be known.
Expecially the first one is a constuction we use quite alot. Can you fix this easily?
J-B
- INSERT statement, RETURNING clause not recognized
ERROR: Unable to parse file: /home/sonarexperiment/XXX/PackageBodies/XXX_BEHEREN_XXX_COLLECTIEF.sql
ERROR: Parse error at line 186 column 6:
172: NOTFOUND THEN
173:
174: INSERT INTO xxx_uitg_xxx_individueel
175: (dnp_id
176: ,pvz_id
177: ,uwc_id
178: ,ingangsdatum_deelneming_pvz
179: ,refnr_bij_pvz)
180: VALUES
181: (r_dnp.id
182: ,pvz_id_in
183: ,uwc_id_in
184: ,ingangsdatum_dln_in
185: ,refnr_bij_pvz_in)
--> RETURNING id INTO l_xxx_id;
Here use a return column that is not even explicitely used as a column in the statement but filled by a trigger (the ID column)
e.g. both situations should work:
insert into car (make, colour) values ('Renault', 'Yellow') returning id into l_car_id;
insert into car (id, make, colour) values (car_sequence.nextval, 'Renault', 'Yellow') returning id into l_car_id;
- Literal quoting not recognized (more info http://stackoverflow.com/questions/11315340/pl-sql-how-to-escape-single-quote-in-a-string)
ERROR: Unable to parse file: /home/sonarexperiment/XXX/PackageBodies/XXX_IMPORT.sql
ERROR: Parse error at line 140 column 59:
135: ;
136: g_xx_import xx_import_aa;
137:
138: c_replace_tablename CONSTANT VARCHAR2(30) := '<tablename>';
139: c_replace_filename CONSTANT VARCHAR2(30) := '<filename>';
--> c_xx_columnnames_first_pme CONSTANT VARCHAR2(32767) := q'[
141: ,AA VARCHAR2(4000)
142: ,BB VARCHAR2(4000)
143: ,CC VARCHAR2(4000)
157: ]';
- Instead of INSERT/DELETE/UPDATE trigger on a VIEW not recognized
ERROR: Unable to parse file: /home/sonarexperiment/XXX/Triggers/XXX_WVK_IOD.sql
ERROR: Parse error at line 2 column 1:
1: CREATE OR REPLACE TRIGGER XXX.XXX_WVK_IOD
--> INSTEAD OF DELETE
3: ON XXX.ZZZ_VIEW_YYY
4: DECLARE
5: aa number(2)
6: BEGIN
- Pragma restict references not reconized. Of course the use of this prama is deprecated so maybe a minor issue.
ERROR: Unable to parse file: /home/sonarexperiment/XXX/Packages/XXX_MATCH.sql
ERROR: Parse error at line 27 column 27:
24: ,P_GEBDAT IN DATE
25: )
26: RETURN NUMBER;
--> PRAGMA RESTRICT_REFERENCES (BEREKENEN_MATCH, WNPS);
from zpa.
@J-Budding RETURNING INTO and INSTEAD OF triggers are known issues. I added the "PRAGMA RESTRICT_REFERENCES" to the list too.
There was a bug with the text literal with user defined delimiter (q'[xxx]') and new lines, but it's fixed now.
from zpa.
Hi,
Any plans to cover the remaining issues in the todo list?
Thanks
from zpa.
Hi,
mix ANSI joins and non-ANSI joins in the same FROM clause doesn't work.
examples:
from foo f, teer t join bar b on t.a = b.a
from teer t join bar b on t.a = b.a, foo f
from cli c, teer t join bar b on t.a = b.a, foo f
Thanks.
from zpa.
Hi,
Thank you for your effort!
Would it be possible for you to implement the following items in the near future?
- conditional compilation
- 'force' in 'create type' statement (-> CREATE OR REPLACE TYPE t1 FORCE AS OBJECT (c varchar(20));)
- 'overriding member function' in 'create type' statement (https://docs.oracle.com/cd/E11882_01/appdev.112/e11822/adobjbas.htm#ADOBJ00214)
Thank you very much!
from zpa.
Hi everyone.
Starting from the next version (2.1, not released yet), the plugin will try to ignore unrecognized/invalid commands instead of stopping the analysis of the whole file. More info here: https://github.com/felipebz/sonar-plsql/wiki/Error-recovery
@khirzer please see the example below, even with the (currently unrecognized) "create type ... force" the plugin reported the violation on the next statement:
To everyone:
This issue itself is a big task list right now. With the new error recovery feature, there's not need to parse correctly things like "ALTER TABLE", "CREATE USER", "CREATE DIRECTORY" and "CREATE JAVA", since there are no coding rules targeting these statements. They can be implemented later if necessary.
I will review every report in this thread to see what it's really necessary, separate in new issues, prioritize them accordingly and then close this issue.
Thanks for your patience. :-)
from zpa.
Thanks! Great feature!
from zpa.
Related Issues (20)
- error "evaluate XPath" in the ZPA Toolkit HOT 1
- PL/SQL ZPA plugin fails during scanning code with SQL-analytic functions HOT 1
- Provide full path to current file (not just file name) HOT 4
- Comparison to SonarQube's PL/SQL-support? HOT 3
- Issue with group by grouping sets (()) HOT 5
- Dependencies causing trouble to have a new custom rule HOT 9
- Confusion!!! HOT 1
- error: cannot find symbol- subscribeTo(DmlGrammar.TABLE_DECLARATION); HOT 12
- zpa plsql plugin - is not detecting any issues with SonarLint connected Mode with VS Code /IntelliJ HOT 1
- xpath rules for scripts in the specified directory
- Lines of Code Limit Rule for PL/SQL in SonarQube HOT 1
- schemaValidation check
- False-positive "Specify the columns in this INSERT." when using ROWTYPE HOT 2
- Custom rule to flag usage of CREATE PUBLIC SYNONYM HOT 1
- Bad Message: Error -- even though it matches the expected message HOT 1
- Parse error - keyword 'except' HOT 1
- Rule 'VariableHiding' - exception entries not included HOT 1
- A few leagal sql statements that fail HOT 3
- Support SQL/JSON functions
- Slow query parsing 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 zpa.