Comments (8)
Previously it was fine, with the latest version i'm getting same warning for similar queries from all over the code base.
from flake8-sql.
There is another query on which it is throwing Q449 token FROM should be aligned to the right of the river
SELECT col1
FROM table1
WHERE NOT EXISTS(SELECT col2
FROM table2
WHERE condtion)
Could that be due to this EXISTS statement?
from flake8-sql.
Hmm, I'm not sure here - it could be. Could you confirm which version it worked in, and which version you are using now?
from flake8-sql.
Previously 0.2.0 and now 0.4.0.
The case is with every exists query of the same nature.
from flake8-sql.
I think it is the exists (and also this d1a1000) - as the exists isn't being recognized as a function.
from flake8-sql.
So is this going to be fixed soon? Or if you can point me i might be able to send a fix.
from flake8-sql.
Very happy for you to send a fix, at the moment I can only point to d1a1000.
from flake8-sql.
I had a look at the function you pointed out, seems like it is working fine (had it debugged). I think the problem is here on this line or below it:
flake8-sql/flake8_sql/linter.py
Line 150 in ba92c22
Debugged this one as well, the values (token col, depth, and previous root values) seems fine to me ( i might not be correct).
Could there be any issue with this condition?
flake8-sql/flake8_sql/linter.py
Line 152 in ba92c22
Values (debugged):
token: FROM
token.col: 27
token.depth: 1
previous_root: SELECT
previous_root.col: 25
previous_root len+1: 7
By adding the root_keyword condition is not working (failing other scenarios), can you help me out a bit here?
from flake8-sql.
Related Issues (18)
- Doesn't recognise literals
- from confusion HOT 1
- Python 3.8 changes behaviour and makes noqa for multiline strings impossible
- Should ABS trigger Q442? HOT 4
- Failed to run Flake8-sql HOT 2
- Q447 a Q449 do not work well with group by and having
- Support f-strings HOT 3
- Evaluate sqlparse
- False positive on docstring HOT 4
- TypeError NoneType - int HOT 1
- Warn Q447 on false horizontal alignment
- Consider DBMS specific keyword lists
- Unable to run flake8_sql with flake8 on Ubuntu 14.04 HOT 4
- The syntax for disabling multiple warnings in one line is too strict HOT 1
- Q440 keyword type / key is not uppercase HOT 2
- SQL queries inside f-strings (Python 3.6+) are not being checked HOT 4
- Q447 root_keywords SELECT and FROM are not right aligned HOT 4
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 flake8-sql.