Skip to content

Commit

Permalink
Merge branch 'main' into 402-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Dec 3, 2024
2 parents 91a5a7a + cc82d8e commit 55b7895
Show file tree
Hide file tree
Showing 356 changed files with 4,289 additions and 2,591 deletions.
173 changes: 173 additions & 0 deletions .cppcheck-suppressions
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# True positives
# imagery
invalidFunctionArg:imagery/i.gensigset/subcluster.c:369
invalidFunctionArg:imagery/i.smap/model.c:158

# lib
memleakOnRealloc:lib/external/shapelib/dbfopen.c:448
va_end_missing:lib/gis/debug.c:82
nullPointer:lib/vector/Vlib/cats.c:513
nullPointer:lib/vector/Vlib/cats.c:517

# False positives
# binder
syntaxError:binder/postBuild:7

# config.guess, config.log, config.status, config.sub, configure, configure.ac
syntaxError:config*

# db
syntaxError:db/databaseintro.html

# demolocation
syntaxError:demolocation/Makefile
syntaxError:demolocation/grassrc.tmpl

# display
syntaxError:display/displaydrivers.html

# dist.x86_64-pc-linux-gnu
syntaxError:dist.x86_64-pc-linux-gnu/*

# doc
syntaxError:doc/*

# docker
syntaxError:docker/README.md

# general/g.version
internalAstError:general/g.version/main.c:49
syntaxError:general/g.version/Makefile:8
syntaxError:general/g.version/g.version.html:72

# imagery/
syntaxError:imagery/imageryintro.html
## We are erroring out early if index is negative, so we won't be hitting this case!
negativeIndex:imagery/i.atcorr/computations.cpp:459
negativeIndex:imagery/i.atcorr/computations.cpp:1025


# include/
syntaxError:include/Makefile
syntaxError:include/VERSION:1

# text files
syntaxError:INSTALL.md
syntaxError:install-sh
syntaxError:GPL.TXT
syntaxError:aclocal.m4
syntaxError:AUTHORS
syntaxError:CITATION.cff
syntaxError:CITING
syntaxError:codecov.yaml
syntaxError:CODE_OF_CONDUCT.md
syntaxError:config.log
syntaxError:configure.ac
syntaxError:CONTRIBUTING.md
syntaxError:contributors.csv
syntaxError:contributors_extra.csv
syntaxError:COPYING
syntaxError:Dockerfile
syntaxError:error.log
syntaxError:flake.lock
syntaxError:flake.nix
syntaxError:grasslib.dox
syntaxError:grass.pc*
syntaxError:Makefile
syntaxError:package.nix
syntaxError:pyproject.toml
syntaxError:README.md
syntaxError:renovate.json5
syntaxError:REQUIREMENTS.md
syntaxError:SECURITY.md
syntaxError:test_keyvalue_result.txt
syntaxError:TODO
syntaxError:translators.csv
syntaxError:Vagrantfile
syntaxError:binaryInstall.src
syntaxError:codecov.yml:19

# lib/
syntaxError:lib/README:3
# Internally generated file while compiling
nullPointer:lib/db/sqlp/sqlp.yy.c
nullPointer:<stdout>
syntaxError:lib/db/sqlp/README
syntaxError:lib/db/sqlp/sql*
## va_copy() was used and it doesn't require va_start.
va_list_usedBeforeStarted:lib/gis/aprintf.c:293
va_list_usedBeforeStarted:lib/gis/aprintf.c:301
va_list_usedBeforeStarted:lib/gis/aprintf.c:348
## Though it's not explicity initialized, the loop next will initialize it. So, it's alright to ignore this.
uninitvar:lib/vector/dglib/tavl.c:380
missingReturn:lib/vector/dglib/nodemgmt-template.c:437
## Though it's not explicity initialized, the loop next will initialize it. So, it's alright to ignore this.
uninitvar:lib/vector/dglib/avl.c:291
unknownMacro:lib/bitmap/Makefile:13
## I feel we can just avoid syntaxError issues, as code can't be compiled unless it's syntax is correct!
## And these usually have a tendency to pop up in the non-C or non-C++ programs!!
syntaxError:lib/*
unknownMacro:lib/gmath/Makefile
unknownMacro:lib/lidar/Makefile


# locale
syntaxError:locale/README.md
syntaxError:locale/Makefile
syntaxError:locale/grass_po_stats.py
unknownMacro:locale/*

# macosx
syntaxError:macosx/*

# man
syntaxError:man/*

# mswindows
syntaxError:mswindows/*

# raster
## FP error, as while loop before ensures that log argument is never equal to 1.
invalidFunctionArg:raster/r.sim/simlib/random.c:36
invalidFunctionArg:raster/r.sim/simlib/random.c:57

## Different rules under different ifdef.
ctuOneDefinitionRuleViolation:raster/r.in.pdal/grassrasterwriter.h:39
syntaxError:raster/rasterintro.html
syntaxError:raster/Makefile:155

# raster3d

## 'missingReturn` error is mostly from blocks for local computations
missingReturn:raster3d/r3.showdspf/draw_cap_ogl.c:68
missingReturn:raster3d/r3.showdspf/make_header.c:32

syntaxError:raster3d/raster3dintro.html:194

# rpm
syntaxError:rpm/grass.spec:244
syntaxError:rpm/grass-pkgconfig.patch:9

# scripts
syntaxError:scripts/windows_sh_launch.bat:11
syntaxError:scripts/windows_launch.bat:1

# temporal
syntaxError:temporal/benchmark.sh:19
syntaxError:temporal/run_all_tests.sh
syntaxError:temporal/temporalintro.html

# testsuite
syntaxError:testsuite/raster_md5test.sh:11
syntaxError:testsuite/README.md:38

# utils
syntaxError:utils/*
unknownMacro:utils/coverage_mapper.py:13
unknownMacro:utils/Makefile:8

# vector

## We are expected to use the memory allocated some other place, so it's FP.
memleak:vector/v.lidar.growing/ConvexHull.c:246
syntaxError:vector/vectorintro.html:11
4 changes: 0 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ per-file-ignores =
gui/wxpython/iclass/frame.py: F405, F403
gui/wxpython/iclass/g.gui.iclass.py: E501
gui/wxpython/iclass/statistics.py: F841, F405, F403
gui/wxpython/location_wizard/dialogs.py: F841
gui/wxpython/location_wizard/wizard.py: E722
gui/wxpython/mapdisp/main.py: E722
gui/wxpython/mapdisp/test_mapdisp.py: E501
gui/wxpython/mapdisp/statusbar.py: F841
gui/wxpython/mapswipe/g.gui.mapswipe.py: E501
gui/wxpython/mapwin/base.py: E722
gui/wxpython/mapwin/buffered.py: E722
gui/wxpython/mapwin/graphics.py: E722
gui/wxpython/startup/locdownload.py: E722, E402
gui/wxpython/timeline/g.gui.timeline.py: E501
# Generated file
gui/wxpython/menustrings.py: E501
Expand All @@ -52,7 +49,6 @@ per-file-ignores =
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/raster/__init__.py: E402
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/raster/category.py: E721
python/grass/temporal/abstract_space_time_dataset.py: E722
python/grass/temporal/c_libraries_interface.py: E722
python/grass/temporal/core.py: E722
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
push: true
pull: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Year and week of year so cache key changes weekly
run: echo "date=$(date +%Y-%U)" >> "${GITHUB_OUTPUT}"
- name: Setup Mamba
uses: mamba-org/setup-micromamba@ab6bf8bf7403e8023a094abeec19d6753bdc143e # v2.0.1
uses: mamba-org/setup-micromamba@06375d89d211a1232ef63355742e9e2e564bc7f7 # v2.0.2
with:
init-shell: bash
environment-file: .github/workflows/macos_dependencies.txt
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
# renovate: datasource=pypi depName=pylint
PYLINT_VERSION: "2.12.2"
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.7.10"
BANDIT_VERSION: "1.8.0"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.8.0"
RUFF_VERSION: "0.8.1"

runs-on: ${{ matrix.os }}
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.0
rev: v0.8.1
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.11@sha256:10c699f1b6c8bdc8f6b4ce8974855dd8542f1768c26eb240237b8f1c9c6c9976
# syntax=docker/dockerfile:1.12@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5

# Note: This file must be kept in sync in ./Dockerfile and ./docker/ubuntu/Dockerfile.
# Changes to this file must be copied over to the other file.
Expand Down
32 changes: 0 additions & 32 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -10411,38 +10411,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
printf "%s\n" "#define HAVE_PDAL 1" >>confdefs.h


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use PDAL NoFilenameWriter" >&5
printf %s "checking whether to use PDAL NoFilenameWriter... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pdal/Writer.hpp>
class St:public pdal::NoFilenameWriter {};
int
main (void)
{
class NFWTest : public pdal::NoFilenameWriter {};
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :


printf "%s\n" "#define HAVE_PDAL_NOFILENAMEWRITER 1" >>confdefs.h

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext

LIBS=${ac_save_libs}
CFLAGS=${ac_save_cflags}
fi
Expand Down
10 changes: 0 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1092,16 +1092,6 @@ else

AC_DEFINE(HAVE_PDAL, 1, [Define to 1 if PDAL exists.])

AC_MSG_CHECKING(whether to use PDAL NoFilenameWriter)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pdal/Writer.hpp>
class St:public pdal::NoFilenameWriter {};]], [[
class NFWTest : public pdal::NoFilenameWriter {};
]])],
[
AC_DEFINE(HAVE_PDAL_NOFILENAMEWRITER, 1, [Define to 1 if PDAL NoFilenameWriter is present.])
AC_MSG_RESULT(yes)
],[AC_MSG_RESULT(no)])

LIBS=${ac_save_libs}
CFLAGS=${ac_save_cflags}
fi
Expand Down
2 changes: 1 addition & 1 deletion db/databaseintro.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3>Attribute data import and export</h3>
Further conversion tools:
<ul>
<li><a href="http://sourceforge.net/projects/mdbtools">MDB Tools</a>: Convert MS-Access data to SQL, DBF, etc.</li>
<li><a href="https://grasswiki.osgeo.org/wiki/Openoffice.org_with_SQL_Databases">Using OpenOffice.org with SQL Databases</a>
<li><a href="https://grasswiki.osgeo.org/wiki/Openoffice.org_with_SQL_Databases">Using OpenOffice.org with SQL Databases</a></li>
</ul>


Expand Down
10 changes: 5 additions & 5 deletions db/db.connect/db.connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h3>SQLite (default backend)</h3>
<h3>PostgreSQL (local connection)</h3>

Local storage, database tables stored in database "mydb"
(may require the use of <em><a href=db.login.html>db.login</a></em>):
(may require the use of <em><a href="db.login.html">db.login</a></em>):
<br>
<div class="code"><pre>
db.connect driver=pg database=mydb
Expand All @@ -49,7 +49,7 @@ <h3>PostgreSQL (local connection)</h3>
<h3>PostgreSQL (network connection)</h3>

Network storage, database tables stored in database "mydb"
(may require the use of <em><a href=db.login.html>db.login</a></em>):
(may require the use of <em><a href="db.login.html">db.login</a></em>):
<br>
<div class="code"><pre>
db.connect driver=pg database=mydb
Expand All @@ -62,7 +62,7 @@ <h3>PostgreSQL (network connection)</h3>
<h3>MySQL (local connection)</h3>

Local storage, database tables stored in database "mydb" (may require
the use of <em><a href=db.login.html>db.login</a></em>):
the use of <em><a href="db.login.html">db.login</a></em>):
<br>
<div class="code"><pre>
db.connect driver=mysql database=mydb
Expand All @@ -75,7 +75,7 @@ <h3>MySQL (local connection)</h3>
<h3>MySQL (network connection)</h3>

Network storage, database tables stored in database "mydb"
(may require the use of <em><a href=db.login.html>db.login</a></em>):
(may require the use of <em><a href="db.login.html">db.login</a></em>):
<br>
<div class="code"><pre>
db.connect driver=mysql database=mydb
Expand All @@ -88,7 +88,7 @@ <h3>MySQL (network connection)</h3>
<h3>ODBC</h3>

Network storage, database tables stored in database "mydb"
(may require the use of <em><a href=db.login.html>db.login</a></em>):
(may require the use of <em><a href="db.login.html">db.login</a></em>):
<br>
<div class="code"><pre>
db.connect driver=odbc database=mydb
Expand Down
2 changes: 1 addition & 1 deletion db/db.execute/db.execute.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h2>SEE ALSO</h2>
<p>
<em>
<a href="sql.html">GRASS SQL interface</a>
<em>
</em>

<h2>AUTHOR</h2>

Expand Down
2 changes: 1 addition & 1 deletion db/db.select/db.select.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h3>Execute multiple SQL statements</h3>
<div class="code"><pre>
cat file.sql
SELECT * FROM busstopsall WHERE cat = 1
SELECT cat FROM busstopsall WHERE cat > 4 AND cat &lt; 8
SELECT cat FROM busstopsall WHERE cat &gt; 4 AND cat &lt; 8

db.select input=file.sql
</pre></div>
Expand Down
Loading

0 comments on commit 55b7895

Please sign in to comment.