Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/spell_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ jobs:
uses: actions/checkout@v6
- name: Check spelling
uses: crate-ci/typos@master
- name: check macros
- name: check macros and error messages
run: |
for file in $(git diff --name-only --diff-filter=A); do
./scripts/internal/check_macros.sh "$file" &>> check_macros.txt
./scripts/internal/check_macros.sh "$file" &>> error.txt
./scripts/internal/check_error_messages.sh "$file" &>> error.txt
done
- name: Archive script output
if: failure()
uses: actions/upload-artifact@v6
with:
name: t8code check macros report
path: check_macros.txt
name: macro_and_error_report
path: error.txt
2 changes: 1 addition & 1 deletion benchmarks/t8_time_forest_partition.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ t8_time_forest_create_cmesh (const char *msh_file, int mesh_dim, const char *cme
/* Partition only if more than 1 input file */
partition = num_files > 1;
}
SC_CHECK_ABORT (cmesh != NULL, "Error when creating cmesh.\n");
SC_CHECK_ABORT (cmesh != NULL, "ERROR when creating cmesh.\n");

if (partition) {
/* partition the cmesh uniformly */
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/t8_time_fractal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ main (int argc, char **argv)
/* The usage string or help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
t8_debugf ("WARNING: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
}

int mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/t8_time_prism_adapt.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ main (int argc, char **argv)
/* The usage string or help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
t8_debugf ("WARNING: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/t8_time_set_join_by_vertices.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ main (int argc, char **argv)

if (sreturnA > BUFSIZ || sreturnB > BUFSIZ) {
/* The usage string or help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
t8_debugf ("WARNING: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
}

int mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
6 changes: 3 additions & 3 deletions example/IO/cmesh/gmsh/t8_read_msh_file.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ t8_read_msh_file_vtk (t8_cmesh_t cmesh, const char *prefix)
t8_debugf ("Wrote to file %s\n", fileprefix);
}
else {
t8_debugf ("Error in writing cmesh vtk\n");
t8_debugf ("ERROR in writing cmesh vtk\n");
}
}

Expand Down Expand Up @@ -124,9 +124,9 @@ main (int argc, char *argv[])

if (sreturn >= BUFSIZ) {
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
8 changes: 4 additions & 4 deletions example/IO/cmesh/t8_cmesh_load_save.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ t8_cmesh_load_distribute (const char *fileprefix, int num_files, int no_vtk)

cmesh = t8_cmesh_load_and_distribute (fileprefix, num_files, sc_MPI_COMM_WORLD, T8_LOAD_SIMPLE, -1);
if (cmesh == NULL) {
t8_errorf ("Error when reading cmesh\n");
t8_errorf ("ERROR when reading cmesh\n");
return;
}
else {
Expand Down Expand Up @@ -75,7 +75,7 @@ t8_cmesh_save_cmesh (const char *mshfile, int dim)
SC_CHECK_MPI (mpiret);
ret = t8_cmesh_save (cmesh, "cmesh_saved");
if (ret == 0) {
t8_errorf ("Error when writing to file\n");
t8_errorf ("ERROR when writing to file\n");
}
else {
t8_debugf ("Saved cmesh to %s\n", "cmesh_saved_RANK.cmesh");
Expand Down Expand Up @@ -106,9 +106,9 @@ main (int argc, char **argv)

if (sreturn >= BUFSIZ) {
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
6 changes: 3 additions & 3 deletions example/IO/cmesh/tetgen/t8_forest_from_tetgen.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ t8_cmesh_from_tetgen (const char *prefix, int do_partition)
t8_debugf ("Wrote to file %s\n", fileprefix);
}
else {
t8_debugf ("Error in writing cmesh vtk\n");
t8_debugf ("ERROR in writing cmesh vtk\n");
}
}
else {
Expand Down Expand Up @@ -96,9 +96,9 @@ main (int argc, char *argv[])

if (sreturn >= BUFSIZ) {
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
8 changes: 4 additions & 4 deletions example/IO/cmesh/tetgen/t8_read_tetgen_file.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ t8_read_tetgen_file_build_cmesh (const char *prefix, int do_dup, int do_partitio
t8_debugf ("Wrote to file %s\n", fileprefix);
}
else {
t8_debugf ("Error in writing cmesh vtk\n");
t8_debugf ("ERROR in writing cmesh vtk\n");
}
if (do_partition) {
t8_cmesh_t cmesh_partitioned;
Expand All @@ -64,7 +64,7 @@ t8_read_tetgen_file_build_cmesh (const char *prefix, int do_dup, int do_partitio
t8_debugf ("Wrote to file %s\n", fileprefix);
}
else {
t8_debugf ("Error in writing cmesh vtk\n");
t8_debugf ("ERROR in writing cmesh vtk\n");
}
t8_cmesh_unref (&cmesh_partitioned);
}
Expand Down Expand Up @@ -95,9 +95,9 @@ main (int argc, char *argv[])

if (sreturn >= BUFSIZ) {
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
4 changes: 2 additions & 2 deletions example/IO/cmesh/tetgen/t8_time_tetgen_file.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ main (int argc, char *argv[])

if (sreturn >= BUFSIZ) {
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
6 changes: 3 additions & 3 deletions example/IO/cmesh/triangle/t8_read_triangle_file.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ t8_read_triangle_file_build_cmesh (const char *prefix, int do_dup, int do_partit
t8_debugf ("Wrote to file %s\n", fileprefix);
}
else {
t8_debugf ("Error in writing cmesh vtk\n");
t8_debugf ("ERROR in writing cmesh vtk\n");
}
t8_cmesh_destroy (&cmesh);
}
Expand Down Expand Up @@ -90,9 +90,9 @@ main (int argc, char *argv[])

if (sreturn >= BUFSIZ) {
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
14 changes: 7 additions & 7 deletions example/IO/cmesh/vtk/t8_cmesh_read_from_vtk.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ along with t8code; if not, write to the Free Software Foundation, Inc.,
/**
* Construct a cmesh read from a VTK-file type supported by our vtk-reader.
* Given the number of cell-values in the file we read the data again from the forest
* and write it into the file forest.(p)vtu .
*
* and write it into the file forest.(p)vtu .
*
* \param[in] prefix The prefix of the file to read the mesh from
* \param[in] comm The communicator used in this example
* \param[in] values_per_cell The number of values per cell in the mesh.
Expand All @@ -43,12 +43,12 @@ void
t8_forest_construct_from_vtk (const char *prefix, sc_MPI_Comm comm, const int values_per_cell, const int partition,
vtk_file_type_t vtk_file_type, const int user_package_id, const char *out_prefix)
{
/* Read a poly-data file (.ply, .vtp, .obj, .stl, .vtk, .g) and construct a cmesh
* representing the mesh. If there is any cell-data, it will be read too.
/* Read a poly-data file (.ply, .vtp, .obj, .stl, .vtk, .g) and construct a cmesh
* representing the mesh. If there is any cell-data, it will be read too.
* Triangle-strips and polygons will be broken down to multiple triangles. */
t8_cmesh_t cmesh_in = t8_vtk_reader_cmesh (prefix, partition, 0, comm, vtk_file_type, user_package_id, 0);
if (cmesh_in == NULL) {
t8_errorf ("Error reading file.\n");
t8_errorf ("ERROR reading file.\n");
return;
}
char out_file[BUFSIZ];
Expand Down Expand Up @@ -140,9 +140,9 @@ main (int argc, char **argv)
usage);
if (sreturn >= BUFSIZ) {
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}
mpiret = sc_MPI_Init (&argc, &argv);
SC_CHECK_MPI (mpiret);
Expand Down
2 changes: 1 addition & 1 deletion example/IO/forest/gmsh/t8_gmsh_to_vtk.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ main (int argc, char **argv)
// The help message was truncated.
// Note: gcc >= 7.1 prints a warning if we
// do not check the return value of snprintf.
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

// Initialize MPI. This has to happen before we initialize sc or t8code.
Expand Down
2 changes: 1 addition & 1 deletion example/advect/t8_advection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ t8_advect_write_vtk (t8_advect_problem_t *problem)
snprintf (vtk_data[1].description, BUFSIZ, "Ana. Solution");
vtk_data[1].type = T8_VTK_SCALAR;
vtk_data[1].data = u_and_phi_array[1];
snprintf (vtk_data[2].description, BUFSIZ, "Error");
snprintf (vtk_data[2].description, BUFSIZ, "ERROR");
vtk_data[2].type = T8_VTK_SCALAR;
vtk_data[2].data = u_and_phi_array[2];
snprintf (vtk_data[3].description, BUFSIZ, "Flow");
Expand Down
4 changes: 2 additions & 2 deletions example/cmesh/t8_cmesh_set_join_by_vertices.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ main (int argc, char **argv)

if (sreturnA > BUFSIZ || sreturnB > BUFSIZ) {
/* The usage string or help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
t8_debugf ("WARNING: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
}

int mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
2 changes: 1 addition & 1 deletion example/forest/t8_test_face_iterate.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ main (int argc, char **argv)
/* The usage string or help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
t8_debugf ("WARNING: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
2 changes: 1 addition & 1 deletion example/forest/t8_test_ghost.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ main (int argc, char **argv)
/* The usage string or help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
t8_debugf ("WARNING: Truncated usage string and help message to '%s' and '%s'\n", usage, help);
}
mpiret = sc_MPI_Init (&argc, &argv);
SC_CHECK_MPI (mpiret);
Expand Down
4 changes: 2 additions & 2 deletions example/forest/t8_test_ghost_large_level_diff.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
*
* If the mesh is not 3D then no element is refined.
*
* Warning: this refinement schemes only works with the default element
* WARNING: this refinement schemes only works with the default element
* scheme (see t8_scheme_new_default in t8_default/t8_default.hxx).
*/
static int
Expand Down Expand Up @@ -221,7 +221,7 @@ main (int argc, char *argv[])
/* The help message was truncated */
/* Note: gcc >= 7.1 prints a warning if we
* do not check the return value of snprintf. */
t8_debugf ("Warning: Truncated help message to '%s'\n", help);
t8_debugf ("WARNING: Truncated help message to '%s'\n", help);
}

mpiret = sc_MPI_Init (&argc, &argv);
Expand Down
Loading