Giter Site home page Giter Site logo

gcc-problem-matcher-improved's Introduction

Improved GCC Problem Matcher

FOSSA Status

Creates annotations for compiler diagnostics (warnings and errors) when building your code.

image

Do you prefer your workflow to fail?

Suppose you don't like compiler warnings. Use the Annotation Failure Action! It finds problem annotations created by the Improved GCC Problem Matcher and causes the workflow job to fail. This is way better than -Werror ("any warning is treated as a compilation error") because your build can complete and you can still run your test suite and collect potential test failures.

Inputs

build-directory

Optional Directory the build is running in. Matched errors will not be able to point to the correct file or create warnings in the Files changed overview unless this is correct.

Example usage

Create annotations for builds done in the default directory. Add this anywhere before starting the build.

    - uses: root-project/gcc-problem-matcher-improved@v1
    
    - name: Build
      run: |
        ...

Create annotations for builds done in directory /workspace/build/

    - uses: root-project/gcc-problem-matcher-improved@v1
      with:
        build-directory: /workspace/build/
        
    - name: Build
      run: |
         ...

Dev Internals

Directories

src/ contains the sources; dist/ is what people use in production. To compile src/ into dist/ run npm run build.

Prerequisite packages for npm run build

Install nvm through curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash or similar, as decribed e.g. here. Install npm by taking a recent version from the output of nvm list-remote and installing it through nvm install v20 or similar. npm run build needs ncc which one needs to install through npm i -g @vercel/ncc.

gcc-problem-matcher-improved's People

Contributors

axel-naumann avatar olemorud avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gcc-problem-matcher-improved's Issues

Fails on paths that contain backslashes (`\`)

When using a build-directory input that contains a backslash, as is common on Windows, then the problem matcher will fail to install with a message similar to the following:

Run root-project/gcc-problem-matcher-improved@9d83f12b27a78210f0485fb188e08d94fa807a6d
  with:
    build-directory: D:\a\melonds-ds\melonds-ds/build
  env:
    BUILD_DIR: D:\a\melonds-ds\melonds-ds/build
    DIST_DIR: D:\a\melonds-ds\melonds-ds/build/dist
Error: Unable to process command '::add-matcher::D:\a\_actions\root-project\gcc-problem-matcher-improved\9d83f12b27a78210f0485fb188e08d94fa807a6d\dist/gcc_matcher.json' successfully.
Error: Bad JSON escape sequence: \a. Path 'problemMatcher[0].pattern[0].regexp', line 7, position 36.

Allow ignoring certain paths

I've been trying to find a problem matcher that can ignore problems with certain paths (e.g subprojects, external, etc..). This seems to be the only problem matcher that's using variables in the regex, would it be possible to add this functionality. I'd submit a PR myself, but I'm not sure on the regex, been messing around but can't get it to work properly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.