From 57a34718f2934789a1bc0256774f643b096c1249 Mon Sep 17 00:00:00 2001 From: nvkulkarni12 <113143510+nvkulkarni12@users.noreply.github.com> Date: Tue, 21 Feb 2023 22:03:00 -0800 Subject: [PATCH 1/2] Create super-linter.yml --- .github/workflows/super-linter.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/super-linter.yml diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 0000000..ca69cec --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,29 @@ +# This workflow executes several linters on changed files based on languages used in your code base whenever +# you push a code or open a pull request. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/github/super-linter +name: Lint Code Base + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] +jobs: + run-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: "main" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 08329f4bd017bd8616f38478d37d7e41cfbac3a9 Mon Sep 17 00:00:00 2001 From: Nidhi V Kulkarni Date: Tue, 21 Feb 2023 22:38:39 -0800 Subject: [PATCH 2/2] cpplint changes --- .github/workflows/super-linter.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index ca69cec..d80524b 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -11,19 +11,13 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] + jobs: - run-lint: + build: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: "main" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v3 + - name: Docker build + run: | + docker build -t cpp-container . + docker run -i cpp-container cpplint *.cpp *.h