Browse Source

Rename toolchain-cppcheck target to cppcheck. Don't write log to plugin dir.

v2
Andrew Belt 1 year ago
parent
commit
b841a6da2a
3 changed files with 10 additions and 13 deletions
  1. +2
    -1
      Dockerfile
  2. +8
    -8
      Makefile
  3. +0
    -4
      README.md

+ 2
- 1
Dockerfile View File

@@ -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.*

+ 8
- 8
Makefile View File

@@ -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
@@ -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 .. \
@@ -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


+ 0
- 4
README.md View File

@@ -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.*
@@ -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!


Loading…
Cancel
Save