Linter: "private-access" incorrectly triggers on access from static context within same class
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Inizia riproducendo le segnalazioni private-access con l’esempio GDScript nell’issue, quindi segui la regola del linter che gestisce le variabili e i metodi privati. Verifica come viene classificato il contesto statico all’interno della stessa classe. Il lavoro è completato quando l’esempio non produce segnalazioni private-access, mentre gli accessi dall’esterno della classe continuano a essere verificati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
The rule private-access is triggered when accessing a private instance member from a static context within the same class. See the example below.
The rule message is "... should not be accessed from outside its class" which let me think this is not intentional and is a bug.
Reproduce
class_name Foo
var _data: int
func _method() -> void:
pass
static func do(foo: Foo) -> void:
foo._data = 0
foo._method()
Expected behaviour
No linter rule triggered.
Observed behaviour
The above example triggers :
[private-access] Private variable '_data' should not be accessed from outside its class
[private-access] Private method '_method' should not be accessed from outside its class
But this is not an access from outside the class...
- Lingua principale
- Rust
- Stelle
- 458
- Fork
- 40
- Merge medio
- 1g 15h
- PR unite (30g)
- 4
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GDQuest/GDScript-formatter
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
GDQuest/GDScript-formatter#362 · 2 commenti ·
-
Godot 4.8.dev6 Parse Error Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
GDQuest/GDScript-formatter#359 · 9 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
GDQuest/GDScript-formatter#327 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
GDQuest/GDScript-formatter#361 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
GDQuest/GDScript-formatter#360 ·
Tutte le issue di GDQuest/GDScript-formatter
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rocky-data/rocky#2181 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Apertabot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
midnightntwrk/midnight-indexer#1557 ·