Skip to content

Pin v1 to use cpp-linter v1.4.9 - #115

Merged
shenxianpeng merged 1 commit into
masterfrom
pin-v1-to-specific-vebsion
Oct 25, 2022
Merged

Pin v1 to use cpp-linter v1.4.9#115
shenxianpeng merged 1 commit into
masterfrom
pin-v1-to-specific-vebsion

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 25, 2022

Copy link
Copy Markdown
Member

This also include fix #108 to v1 version

@2bndy5

2bndy5 commented Oct 25, 2022

Copy link
Copy Markdown
Collaborator

We can't run v1 in the test repo because the test repo's CI now uses all platforms supported. Whereas, v1 (as an action not a pkg) can only run on Linux because Github doesn't allow/use docker-based actions on anything but Linux runners.

Given that this still passed on the Linux runners in the test repo, it's ok to merge this.

@shenxianpeng

shenxianpeng commented Oct 25, 2022

Copy link
Copy Markdown
Member Author

OK. I'm going to merge it.
I also update tag v1 to the latest commit of the master branch with the job

@shenxianpeng
shenxianpeng merged commit 68f7e75 into master Oct 25, 2022
@shenxianpeng
shenxianpeng deleted the pin-v1-to-specific-vebsion branch October 25, 2022 09:17
@2bndy5

2bndy5 commented Oct 25, 2022

Copy link
Copy Markdown
Collaborator

It also looks like powershell is having a problem with the multiline input that invokes the cpp-linter exe script. I think there's a better YAML fix for that where each line is joined with spaces instead of \n:

      - name: Run linter as package
        id: linter
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: >
          cpp-linter 
            -s=file 
            -v=9 
            -i=build 
            -p=build 
            -V=${{ runner.temp }}/llvm 
            -f=false 
            --extra-arg="-std=c++14 -Wall" 
            --thread-comments=${{ matrix.clang-version == '12' }} 
            -a=${{ matrix.clang-version == '12' }} 

notice run: option using the > syntax instead of |.

@shenxianpeng

Copy link
Copy Markdown
Member Author

OK, so my update to the master branch of test-cpp-linter-action repo is incorrect, I thought it maybe not support --extra-arg at that moment.

@2bndy5

2bndy5 commented Oct 25, 2022

Copy link
Copy Markdown
Collaborator

It definitely installed the right version, so I doubt that's a problem with the cpp-linter exe script. Only 1 way to find out...

@2bndy5

2bndy5 commented Oct 25, 2022

Copy link
Copy Markdown
Collaborator

yep, that fixed it, but I had to use a consistent indentation.

        run: >
          cpp-linter 
          -s=file 
          -v=9 
          -i=build 
          -p=build 
          -V=${{ runner.temp }}/llvm 
          -f=false 
          --extra-arg="-std=c++14 -Wall" 
          --thread-comments=${{ matrix.clang-version == '12' }} 
          -a=${{ matrix.clang-version == '12' }}

which looks kinda ugly IMHO, but its YAML... I'm not a huge fan of YAML syntax despite my widespread use of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants