-
-
Notifications
You must be signed in to change notification settings - Fork 873
Closed
Labels
awaiting feedbackCannot continue investigating until more information is provided.Cannot continue investigating until more information is provided.bugSomething isn't workingSomething isn't working
Description
Search before asking
- I searched the issues and found no similar issues.
What Happened
The rule references.special_chars
(RF05
) does not apply the setting quoted_identifiers_policy = column_aliases
correctly.
Expected Behaviour
The setting quoted_identifiers_policy
under [sqlfluff:rules:references.special_chars]
should behave as follows:
aliases
: Detect quoted identifiers with special characters only in aliases, not in column aliasescolumn_aliases
: Detect quotes identifiers with special characters only in column aliases, not in aliases
Observed Behaviour
Setting quoted_identifiers_policy = column_aliases
detects quoted identifiers with special characters in both aliases and column aliases.
How to reproduce
Create file test.sql
as:
SELECT 1 AS "special*"
FROM VALUES ((1)) AS "special*"
Run sqlfluff lint test.sql -r rf05
gives the following output:
== [models\test.sql] FAIL
L: 1 | P: 13 | RF05 | Do not use special characters in identifiers.
| [references.special_chars]
L: 2 | P: 22 | RF05 | Do not use special characters in identifiers.
| [references.special_chars]
All Finished 📜 🎉!
Dialect
PostgreSQL
Version
SQLFluff 3.1.0
Python 3.12.1
Configuration
[sqlfluff]
dialect = postgres
[sqlfluff:rules:references.special_chars]
quoted_identifiers_policy = aliases
Are you willing to work on and submit a PR to address the issue?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
awaiting feedbackCannot continue investigating until more information is provided.Cannot continue investigating until more information is provided.bugSomething isn't workingSomething isn't working