Inflections are generated in one direction, so an inflected file name is never carried by its stem
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Comienza con namespace.Contains y la lógica de generación de formas flexionadas; después, reproduce el comportamiento usando internal/ssa/tracing.go y los ejemplos de tracing/tracer del issue. Compara el vocabulary workaround existente con el comportamiento propuesto y determina cómo deben tratarse las formas verbales equivalentes. Se considera terminado cuando la misma familia verbal se trata de forma coherente sin hacer que nombres no relacionados, como story, coincidan con store.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Inflected forms are generated from the namespace, and only ever longer ones. A namespace that is itself an inflected form is never carried by its own stem, so the verdict depends on which form the file name happens to use.
store.go storingThing carried
storing.go storeOther not carried
trace.go tracingZ carried
trace.go tracerW carried
tracing.go traceX not carried
tracing.go tracerY not carried
Every pair above is the same English verb. The rule separates them on nothing an author would recognise as a rule.
Where it came from
namespace.Contains allows the namespace anywhere in the name, with a free right edge. That covers a name longer than the namespace: store is a prefix of storing, so storingThing carries it without any generation at all.
Generation exists for the two inflections that change the namespace's own spelling, store to storing and apply to applies. It is built from the namespace side on purpose, so that only constructed forms are accepted and story never carries store.
That decision is still right. The gap is that generation only ever lengthens. Nothing produces trace from tracing, and the free right edge cannot help, since the namespace is the longer string.
This is real, not hypothetical
zerologlintctx has internal/ssa/tracing.go, whose declarations are tracerType, tracerEvent, traceValue, traceCommon, tracePhi. Under qualify: ondemand the file is asked for tracingTracerType and tracingTraceValue, which stutter. Renaming the file to tracer.go silences five of them and leaves the trace* ones, so the file name decides how much stuttering is demanded.
Options
Generate the stem as well. Reversing the e-drop turns tracing into trace, and that is the answer here. It is also how ring becomes r and string becomes str, so it needs a guard beyond stripping ing, and any guard is a rule about English rather than about Go.
Leave it to rules.naming.vocabulary. One line covers the case, and the free right edge makes it reach the whole family:
rules:
naming:
vocabulary:
tracing: [trace]
This works today. It asks the author to notice a distinction that has no reason behind it, which is the part worth fixing.
Report it. A namespace the generator can recognise as an inflected form could carry a note in the diagnostic, pointing at the vocabulary key rather than at a rename that stutters.
Note
The rule is off by default, so nothing is broken for a project that has not opted in. What the vocabulary covers, it covers well. The asymmetry is the defect: two files spelled by the same verb are treated differently, and the author has no way to predict which one is which.
- Lenguaje dominante
- Go
- Estrellas
- 18
- Forks
- 0
- Merge medio
- 57 min
- PR fusionados (30 d)
- 92
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NVIDIA/k8s-device-plugin#2076 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
area/release kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
kubernetes-sigs/kueue#16455 · 1 comentario ·
Los mantenedores suelen responder en 1 día