clj-python / clj-python/libpython-clj
py. syntax is doing weird things with the clj-kondo linter
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Clojure
- Sterne
- 1.2k
- Forks
- 74
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
The linter is doing something weird, because it assumes that py/py. is actually a reference to the symbol "py/py" with no ".".
I'm unable to write a custom :lint-as for this, because clj-kondo doesn't consider the possibility that "py." could represent a macro. ingoring :unresolved-var doesn't quite fill my usecase, as I want to remove the red squiglies under the second argument of the py. call as well.
I think clj-kondo is technically in the right here, because py. isn't supported clojure syntax, although I do like the py. notation, and it'd be nice if it was supported. I don't ask to change the notation, but it'd be nice to have a workaround that fixes these tooling issues.
https://clojure.org/reference/reader#_reader_forms
Symbols beginning or ending with '.' are reserved by Clojure.
Great Library! -- Sammy
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den Aufruf py/py. mit clj-kondo zu reproduzieren, und vergleiche dabei das Verhalten eines benutzerdefinierten :lint-as mit der Unterdrückung von :unresolved-var. Keine Implementierungsdatei oder kein Test wird genannt; verfolge, wie clj-kondo die reservierte py.-Notation parst, und definiere den Abschluss als eine funktionierende Lint-Konfiguration oder dokumentierte Unterstützung, die beide gemeldeten Wellenlinien entfernt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- clojure, python
- Bereich
- tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100