RenameVariables does not update named arguments everywhere

Aperta
#712 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
tooling

Direzione di ricerca

Inizia con il comportamento di RenameVariables descritto nell’issue e riproducilo usando l’esempio Robot Framework fornito. Traccia come vengono gestite la dichiarazione dell’argomento e la chiamata con argomento denominato; il completamento dovrebbe aggiornare in modo coerente gli utilizzi degli argomenti denominati in tutto il progetto oppure stabilire il comportamento di warning/default configuration concordato per questa issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Following up on #711, I notice that RenameVariables works on keyword also applies to arguments (which is what I was looking for), but does not update the instances where these arguments are used with their name. Which is unfortunate since:

The named argument syntax is both case and space sensitive. The former means that if you have an argument arg, you must use it like arg=value, and neither Arg=value nor ARG=value works. The latter means that spaces are not allowed before the = sign, and possible spaces after it are considered part of the given value.

(source)

However, I am not sure robotidy can handle this as it requires applying the change across multiple files.
Maybe raising a warning on this subject could be enough? Or a default configuration to not apply to keyword arguments.

BEFORE
image

AFTER
image

CODE TO REPRODUCE

My Keyword
    [Arguments]    ${expected error}
    TRY
        No Operation
    EXCEPT    ${expected error}
        No Operation
    END

Another Keyword
    My Keyword    expected error=my error pattern

Side Note: When I use RobotCode "rename symbol" feature, it nicely updates the named arguments all over the project.

Lingua principale
RobotFramework
Stelle
113
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MarketSquare/robotframework-tidy

Tutte le issue di MarketSquare/robotframework-tidy

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.