DOC: Shorten two code comments that break the comment style rules

Abierto Apto para principiantes
#1,847 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

Lee los dos bloques de comentarios indicados en ConvertOrientationsToVertexGeometryFilter.cpp y test/GeometryTest.cpp. Comprueba cada frase según el límite de 25 palabras del proyecto y la regla sobre contracciones, y corrige el error tipográfico señalado. La tarea estará completada cuando ambos comentarios sean concisos y precisos, y el comportamiento del código siga siendo el mismo.

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

Descripción

documentation

Summary

Two code comments break the project's comment style rules: sentences of at most 25 words, and no contractions. One of them also has a typo.

What is requested: rewrite these two comment blocks in short, plain sentences. The code does not change.

Why it is needed: long run-on comments are hard to read. Both of these explain a non-obvious choice, so a reader needs to understand them at a glance.

How it works now (develop at 2eb6b878f6ff408d1454754d4c0e63edd676d7e0):

  1. ConvertOrientationsToVertexGeometryFilter.cpp lines 167–170 (OrientationAnalysis):

    // We are using the CreateArrayAction here instead of the CopyArrayAction because the
    // CopyArrayAction will have the destination DataArray have the same tuple shape
    // as the source array, but in this case we don't want that. So we use the CreateArrayAction
    // instead and manually update the tuple shape later one.
    

    The first sentence has 36 words and uses "don't". "later one" should be "later on". A possible rewrite:

    // CreateArrayAction allocates the destination with a one-dimensional tuple shape.
    // CopyArrayAction would keep the tuple shape of the source array.
    // Execute copies the values and then updates the destination tuple shape.
    
  2. test/GeometryTest.cpp lines 463–467:

    // RectGridGeom::setBounds validation
    // Covers: valid inputs (positive, negative, zero-straddling, minimum size,
    // null-pointer clear), size rejection (-4006) on each axis, monotonicity
    // rejection (-4007) on each axis, and atomicity (geometry is not modified
    // when any axis fails validation).
    

    The "Covers:" sentence has 35 words. A possible rewrite:

    // RectGridGeom::setBounds validation.
    // Covers positive, negative, zero-straddling and minimum-size inputs, plus clearing with a null pointer.
    // Checks size errors (-4006) and monotonicity errors (-4007) on each axis.
    // The geometry must stay unchanged when validation fails on any axis.
    

Where it applies: the two files above. No behavior, documentation page or test result changes.

Found while reviewing #1838, which edits both files but not these comments.

Lenguaje dominante
C++
Estrellas
18
Forks
15
Merge medio
5 d 32 min
PR fusionados (30 d)
24

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 BlueQuartzSoftware/simplnx

Todos los issues de BlueQuartzSoftware/simplnx

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.