Skip to content

Commit

Permalink
Merge branch 'main' into flake8-E722
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Dec 12, 2024
2 parents 4636a1b + 3022d9f commit fce09c3
Show file tree
Hide file tree
Showing 1,032 changed files with 16,822 additions and 11,779 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
67 changes: 21 additions & 46 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,30 @@ per-file-ignores =
# E402 module level import not at top of file
# E501 line too long
# W605 invalid escape sequence
# F401 imported but unused
# F821 undefined name 'unicode'
# F841 local variable assigned to but never used
# E741 ambiguous variable name 'l'
__init__.py: F401, 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/modules/*: F841
gui/wxpython/nviz/*: F841, E266, F403, F405
gui/wxpython/photo2image/*: F841, E265
gui/wxpython/photo2image/g.gui.photo2image.py: E501, F841
gui/wxpython/psmap/*: F841, E266, F405, F403
gui/wxpython/vdigit/*: F841, F405, F403
gui/wxpython/vnet/*: F841
gui/wxpython/wxgui.py: F841
gui/wxpython/photo2image/g.gui.photo2image.py: E501
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
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/profile.py: F841
gui/wxpython/wxplot/base.py: F841
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/startup/locdownload.py: E402
gui/wxpython/mapwin/base.py: E722
gui/wxpython/mapwin/buffered.py: E722
gui/wxpython/mapwin/graphics.py: E722
gui/wxpython/timeline/g.gui.timeline.py: E501
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: E741
# Generated file
gui/wxpython/menustrings.py: E501
# F821 undefined name 'cmp'
Expand All @@ -59,37 +46,26 @@ 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/gunittest/invoker.py: E721
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/modules/interface/*.py: F401
python/grass/pygrass/modules/grid/*.py: F401
python/grass/pygrass/raster/category.py: E721
python/grass/pygrass/rpc/__init__.py: F401, F403
python/grass/pygrass/utils.py: E402
python/grass/temporal/univar_statistics.py: E231
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
# 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, F401, F821
python/grass/pygrass/tests/benchmark.py: F821
# Configuration file for Sphinx:
# Ignoring import/code mix and line length.
python/grass/docs/conf.py: E402
# Files not managed by Black
python/grass/imaging/images2gif.py: E226
# Unused imports in init files
# F401 imported but unused
# F403 star import used; unable to detect undefined names
python/grass/*/__init__.py: F401, F403
python/grass/*/*/__init__.py: F401, F403
python/grass/*/*/*/__init__.py: F401, F403
python/grass/temporal/__init__.py: F401, F403
# E402 module level import not at top of file
scripts/d.polar/d.polar.py: F841
scripts/r.in.wms/wms_cap_parsers.py: F841, E741
scripts/r.in.wms/wms_drv.py: E402
scripts/r.semantic.label/r.semantic.label.py: F841, E501
scripts/v.report/v.report.py: F841, E721
scripts/db.out.ogr/db.out.ogr.py: F841
scripts/g.extension/g.extension.py: F841, E501
scripts/r.semantic.label/r.semantic.label.py: E501
scripts/g.extension/g.extension.py: E501
scripts/v.unpack/v.unpack.py: E501
scripts/v.import/v.import.py: E501
scripts/db.univar/db.univar.py: E501
Expand All @@ -99,8 +75,7 @@ per-file-ignores =
scripts/*/*.py: E501
temporal/t.rast.to.vect/t.rast.to.vect.py: E501
temporal/t.vect.algebra/t.vect.algebra.py: E501
# ## used (##% key: r etc)
temporal/t.rast.what/t.rast.what.py: E265, E266, E501
temporal/t.rast.what/t.rast.what.py: E501
# Line too long (esp. module interface definitions)
temporal/*/*.py: E501

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/create-upload-suggestions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout repository contents
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 31

Expand All @@ -43,7 +43,7 @@ jobs:
exclude: mswindows .*\.bat .*/testsuite/data/.*

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.10'

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
Loading

0 comments on commit fce09c3

Please sign in to comment.