Skip to content

Commit

Permalink
Merge branch 'main' into ubuntu-max-py313
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Dec 19, 2024
2 parents aec46a0 + 6930424 commit 90f1653
Show file tree
Hide file tree
Showing 877 changed files with 16,464 additions and 10,371 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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ dist.*
!.git/refs/heads
!.git/objects
.git/objects/*
!.git/objects/pack
42 changes: 4 additions & 38 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,26 @@ per-file-ignores =
# F821 undefined name 'unicode'
# F841 local variable assigned to but never used
# E741 ambiguous variable name 'l'
__init__.py: F403
man/build_html.py: E501
man/build_md.py: E501
doc/python/m.distance.py: E501
gui/scripts/d.wms.py: E501
gui/wxpython/image2target/g.gui.image2target.py: E501
gui/wxpython/photo2image/g.gui.photo2image.py: E501
gui/wxpython/psmap/*: E501, E722
gui/wxpython/psmap/*: E501
gui/wxpython/vdigit/*: F841, E722, F405, F403
gui/wxpython/animation/g.gui.animation.py: E501
gui/wxpython/tplot/frame.py: F841, E722
gui/wxpython/tplot/g.gui.tplot.py: E501
gui/wxpython/rdigit/g.gui.rdigit.py: F841
gui/wxpython/iclass/digit.py: F405, F403
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/wxplot/histogram.py: E722
gui/wxpython/wxplot/profile.py: F841, E722
gui/wxpython/wxplot/base.py: F841, E722
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
gui/wxpython/tools/build_modules_xml.py: E722
gui/wxpython/web_services/cap_interface.py: E501
gui/wxpython/web_services/widgets.py: F841, E402
gui/wxpython/rlisetup/sampling_frame.py: F841
gui/wxpython/rlisetup/wizard.py: E722
# Generated file
gui/wxpython/menustrings.py: E501
# F821 undefined name 'cmp'
Expand All @@ -61,40 +46,21 @@ per-file-ignores =
# C wrappers call libgis.G_gisinit before importing other modules.
# TODO: Is this really needed?
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/pygrass/rpc/__init__.py: F403
python/grass/pygrass/utils.py: E402
python/grass/temporal/abstract_space_time_dataset.py: E722
python/grass/temporal/c_libraries_interface.py: E722
python/grass/temporal/core.py: E722
python/grass/temporal/datetime_math.py: E722
python/grass/temporal/spatial_topology_dataset_connector.py: E722
python/grass/temporal/temporal_algebra.py: E722
python/grass/temporal/temporal_granularity.py: E722
python/grass/temporal/temporal_raster_base_algebra.py: E722
python/grass/temporal/temporal_topology_dataset_connector.py: E722
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
python/grass/pygrass/tests/benchmark.py: E402, F821
python/grass/pygrass/tests/benchmark.py: F821
# Configuration file for Sphinx:
# Ignoring import/code mix and line length.
# Files not managed by Black
python/grass/imaging/images2gif.py: E226
# Unused imports in init files
# F403 star import used; unable to detect undefined names
python/grass/*/__init__.py: F401, F403
python/grass/*/*/__init__.py: F403
python/grass/*/*/*/__init__.py: F403
# E402 module level import not at top of file
scripts/r.in.wms/wms_gdal_drv.py: E722
scripts/r.in.wms/wms_drv.py: E402, E722
scripts/r.in.wms/srs.py: E722
scripts/r.semantic.label/r.semantic.label.py: E501
scripts/db.out.ogr/db.out.ogr.py: F841
scripts/g.extension/g.extension.py: E501
scripts/v.unpack/v.unpack.py: E501n
scripts/v.unpack/v.unpack.py: E501
scripts/v.import/v.import.py: E501
scripts/db.univar/db.univar.py: E501
scripts/i.pansharpen/i.pansharpen.py: E501
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/create-upload-suggestions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ runs:
echo "diff-file-name=${INPUT_DIFF_FILE_NAME}" >> "${GITHUB_OUTPUT}"
env:
INPUT_DIFF_FILE_NAME: ${{ steps.tool-name-safe.outputs.diff-file-name }}
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
id: upload-diff
if: >-
${{ (steps.files_changed.outputs.files_changed == 'true') &&
Expand All @@ -200,7 +200,7 @@ runs:
echo 'Suggestions can only be added near to lines changed in this PR.'
echo 'If any fixes can be added as code suggestions, they will be added shortly from another workflow.'
} >> "${GITHUB_STEP_SUMMARY}"
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
id: upload-changes
if: >-
${{ always() &&
Expand All @@ -225,7 +225,7 @@ runs:
env:
FORMATTED_URL: >-
[`formatted-${{ steps.tool-name-safe.outputs.tool-name }}`](${{
steps.upload-changes.outputs.artifact-url }})
steps.upload-changes.outputs.artifact-url }})
- name: Fail action if some files were changed
if: >-
${{ (steps.files_changed.outputs.files_changed == 'true') &&
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/build_ubuntu-22.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@ set -u
export INSTALL_PREFIX=$1

./configure \
--prefix="$INSTALL_PREFIX/" \
--enable-largefile \
--with-cxx \
--with-zstd \
--with-bzlib \
--prefix="$INSTALL_PREFIX/" \
--with-blas \
--with-bzlib \
--with-cxx \
--with-fftw \
--with-freetype \
--with-freetype-includes="/usr/include/freetype2/" \
--with-geos \
--with-lapack \
--with-libsvm \
--with-readline \
--with-netcdf \
--with-openmp \
--with-pdal \
--with-pthread \
--with-tiff \
--with-freetype \
--with-freetype-includes="/usr/include/freetype2/" \
--with-proj-share=/usr/share/proj \
--with-geos \
--with-pthread \
--with-readline \
--with-sqlite \
--with-fftw \
--with-netcdf
--with-tiff \
--with-zstd

eval $makecmd
make install
26 changes: 13 additions & 13 deletions .github/workflows/build_ubuntu-22.04_without_x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ set -u
export INSTALL_PREFIX=$1

./configure \
--prefix="$INSTALL_PREFIX/" \
--enable-largefile \
--with-cxx \
--with-zstd \
--with-bzlib \
--prefix="$INSTALL_PREFIX/" \
--with-blas \
--with-lapack \
--with-readline \
--without-openmp \
--with-pdal \
--without-pthread \
--with-tiff \
--with-bzlib \
--with-cxx \
--with-fftw \
--with-freetype \
--with-freetype-includes="/usr/include/freetype2/" \
--with-proj-share=/usr/share/proj \
--with-geos \
--with-lapack \
--with-netcdf \
--with-pdal \
--with-proj-share=/usr/share/proj \
--with-readline \
--with-sqlite \
--with-fftw \
--with-netcdf
--with-tiff \
--with-zstd \
--without-openmp \
--without-pthread

eval $makecmd
make install
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- uses: rui314/setup-mold@b015f7e3f2938ad3a5ed6e5111a8c6c7c1d6db6e # v1
- uses: rui314/setup-mold@bac87d5a5820d626ba77131fbbfbce77faf03b6e # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -81,6 +81,6 @@ jobs:
run: .github/workflows/build_ubuntu-22.04.sh "${HOME}/install"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
category: "/language:${{matrix.language}}"
Loading

0 comments on commit 90f1653

Please sign in to comment.