Report `#[contracterror]` on a non-enum item

Abierto
#40 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
tooling

Línea de trabajo

Start with src/parse.js and src/analyze.js to trace how #[contracterror] attributes and item kinds are handled, then read the related cases in test/parse.test.js and test/analyze.test.js. Add an error finding for the attribute on a non-enum item, including its kind and line, and document the rule in docs/RULES.md. Run npm test -- test/analyze.test.js and confirm attributed enums remain unaffected.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

analysis wave

Context

The attribute only makes sense on an enum. When it is placed on a struct or union, the parser skips it and the mistake is silent.

Scope

  • src/parse.js
  • src/analyze.js
  • test/parse.test.js
  • test/analyze.test.js

Acceptance criteria

  • A new attribute-misplaced finding names the item kind and the line.
  • The finding is an error.
  • An enum with the attribute is unaffected.
  • The rule is documented in docs/RULES.md.

Verification

npm test -- test/analyze.test.js

Complexity

Medium (3 hours)

Part of Stellar Wave. Comment to claim this issue before starting.

Lenguaje dominante
JavaScript
Estrellas
0
Forks
2
Merge medio
1 d 1 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de codepacct/codepact-core

Todos los issues de codepacct/codepact-core

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.