Skip to content

Commit

Permalink
Rename toolchain-cppcheck target to cppcheck. Don't write log to plug…
Browse files Browse the repository at this point in the history
…in dir.
  • Loading branch information
AndrewBelt committed Feb 26, 2024
1 parent 318a33d commit b841a6d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ COPY MacOSX11.1.sdk.tar.* /home/build/rack-plugin-toolchain/
RUN JOBS=$JOBS make toolchain-mac
RUN JOBS=$JOBS make toolchain-win
RUN JOBS=$JOBS make toolchain-lin
RUN JOBS=$JOBS make toolchain-cppcheck

RUN JOBS=$JOBS make cppcheck

RUN rm MacOSX11.1.sdk.tar.*
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ all: toolchain-all rack-sdk-all
# Toolchain build


toolchain-all: toolchain-lin toolchain-win toolchain-mac toolchain-cppcheck
toolchain-all: toolchain-lin toolchain-win toolchain-mac cppcheck


crosstool-ng := $(LOCAL_DIR)/bin/ct-ng
Expand Down Expand Up @@ -113,11 +113,11 @@ $(toolchain-mac):


CPPCHECK_VERSION := 2.13.0
toolchain-cppcheck := $(LOCAL_DIR)/cppcheck/bin/cppcheck
toolchain-cppcheck: $(toolchain-cppcheck)
$(toolchain-cppcheck):
wget --continue "https://github.com/danmar/cppcheck/archive/refs/tags/$(CPPCHECK_VERSION).tar.gz"
tar xvf $(CPPCHECK_VERSION).tar.gz
cppcheck := $(LOCAL_DIR)/cppcheck/bin/cppcheck
cppcheck: $(cppcheck)
$(cppcheck):
$(WGET) "https://github.com/danmar/cppcheck/archive/refs/tags/$(CPPCHECK_VERSION).tar.gz"
$(UNTAR) $(CPPCHECK_VERSION).tar.gz
cd cppcheck-$(CPPCHECK_VERSION) && mkdir build
cd cppcheck-$(CPPCHECK_VERSION)/build \
&& cmake .. \
Expand Down Expand Up @@ -253,8 +253,8 @@ plugin-build-clean:
# Static Analysis

static-analysis-cppcheck: export PATH := $(LOCAL_DIR)/cppcheck/bin:$(PATH)
static-analysis-cppcheck: toolchain-cppcheck
cd $(PLUGIN_DIR) && cppcheck src/ -isrc/dep --std=c++11 -j $(shell nproc) -q --error-exitcode=1 2>&1 | tee cppcheck-results.log
static-analysis-cppcheck: cppcheck
cd $(PLUGIN_DIR) && cppcheck src/ -isrc/dep --std=c++11 -j $(shell nproc) --error-exitcode=1


plugin-analyze: static-analysis-cppcheck
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ Analyze your plugin source code.
make -j$(nproc) plugin-analyze PLUGIN_DIR=...
```

Analysis results will be captured in a results file in the plugin source directory.

### Docker toolchain build

*Works on any operating system with [Docker](https://www.docker.com/) installed.*
Expand Down Expand Up @@ -101,8 +99,6 @@ Analyze plugin source code.
make -j$(nproc) docker-plugin-analyze PLUGIN_DIR=...
```

Analysis results will be captured in a results file in the plugin source directory.

#### Notes for building and using the Docker-based toolchain on macOS

- Ensure that Docker Desktop has sufficient amount of resources (RAM, disk space) allocated to build the toolchain!
Expand Down

0 comments on commit b841a6d

Please sign in to comment.