Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc: use SARIF output with --gcc-analyzer-bin #187

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

kdudka
Copy link
Member

@kdudka kdudka commented Oct 14, 2024

With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/ added to the fedora-41-x86_64 mock config, this can be tested using the following commands:

koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc

Depends-on: csutils/csdiff#210
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613

@kdudka kdudka self-assigned this Oct 14, 2024
@@ -289,6 +301,24 @@
# tell csgcca to use the wrapped script rather than system gcc analyzer
props.env["CSGCCA_ANALYZER_BIN"] = CSMOCK_GCC_WRAPPER_NAME

# create directory for gcc results
def create_gcc_results_dir_hook(results, mock):

Check warning

Code scanning / vcs-diff-lint

Plugin.handle_args.csgcca_hook.create_gcc_results_dir_hook: Unused argument 'results'

Plugin.handle_args.csgcca_hook.create_gcc_results_dir_hook: Unused argument 'results'
py/plugins/gcc.py Fixed Show fixed Hide fixed
kdudka added a commit to kdudka/csmock that referenced this pull request Oct 14, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Closes: csutils#187
kdudka added a commit to kdudka/csmock that referenced this pull request Oct 14, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
kdudka added a commit to kdudka/csdiff that referenced this pull request Oct 15, 2024
... in the names of input files.  If we have too many input files, we
cannot rely on the glob expansion implemented in the shell because the
expanded command might exceed the maximum command line length.  Running
`csgrep` for multiple batches of input files is difficult when we use
a JSON-based output format, which cannot be concatenated as plain text.

Related: csutils/csmock#187
kdudka added a commit to kdudka/csdiff that referenced this pull request Oct 15, 2024
... in the names of input files.  If we have too many input files, we
cannot rely on the glob expansion implemented in the shell because the
expanded command might exceed the maximum command line length.  Running
`csgrep` for multiple batches of input files is difficult when we use
a JSON-based output format, which cannot be concatenated as plain text.

Related: csutils/csmock#187
Closes: csutils#212
kdudka added a commit to kdudka/csdiff that referenced this pull request Oct 15, 2024
... in the names of input files.  If we have too many input files, we
cannot rely on the glob expansion implemented in the shell because the
expanded command might exceed the maximum command line length.  Running
`csgrep` for multiple batches of input files is difficult when we use
a JSON-based output format, which cannot be concatenated as plain text.

Related: csutils/csmock#187
Closes: csutils#212
kdudka added a commit to kdudka/csmock that referenced this pull request Oct 15, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
kdudka added a commit to kdudka/csmock that referenced this pull request Oct 15, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
kdudka added a commit to kdudka/csmock that referenced this pull request Oct 15, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
kdudka added a commit to kdudka/csdiff that referenced this pull request Oct 23, 2024
... in the names of input files.  If we have too many input files, we
cannot rely on the glob expansion implemented in the shell because the
expanded command might exceed the maximum command line length.  Running
`csgrep` for multiple batches of input files is difficult when we use
a JSON-based output format, which cannot be concatenated as plain text.

Related: csutils/csmock#187
Closes: csutils#212
kdudka added a commit to kdudka/csmock that referenced this pull request Oct 25, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Depends-on: csutils/csdiff#212
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
kdudka added a commit to kdudka/csmock that referenced this pull request Nov 5, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Depends-on: csutils/csdiff#212
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
kdudka added a commit to kdudka/csdiff that referenced this pull request Nov 7, 2024
... in the names of input files.  If we have too many input files, we
cannot rely on the glob expansion implemented in the shell because the
expanded command might exceed the maximum command line length.  Running
`csgrep` for multiple batches of input files is difficult when we use
a JSON-based output format, which cannot be concatenated as plain text.

Related: csutils/csmock#187
Closes: csutils#212
kdudka added a commit to kdudka/csmock that referenced this pull request Nov 7, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Depends-on: csutils/csdiff#212
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
@kdudka kdudka changed the title gcc: use SARIF output with --gcc-analyzer-bin [EXPERIMENTAL] gcc: use SARIF output with --gcc-analyzer-bin Nov 7, 2024
@kdudka kdudka marked this pull request as ready for review November 7, 2024 13:18
@kdudka kdudka requested a review from siteshwar November 7, 2024 13:19
@kdudka
Copy link
Member Author

kdudka commented Nov 7, 2024

As both the csdiff pull requests this depends on are merged, I went ahead and marked this one as ready for review.

@siteshwar Could you please try this out?

@kdudka
Copy link
Member Author

kdudka commented Nov 7, 2024

I forgot to say that the pre-release csdiff packages are being built in this COPR: https://copr.fedorainfracloud.org/coprs/g/codescan/csutils/

kdudka added a commit to kdudka/csmock that referenced this pull request Nov 7, 2024
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Depends-on: csutils/csdiff#212
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
With https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-latest/
added to the `fedora-41-x86_64` mock config, this can be tested
using the following commands:
```
koji download-build -a src units-2.23-3.fc41
csmock -f units-2.23-3.fc41.src.rpm -r fedora-41-x86_64 --install gcc-latest --gcc-analyzer-bin /opt/gcc-latest/bin/gcc
```

Depends-on: csutils/csdiff#210
Depends-on: csutils/csdiff#212
Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613
Closes: csutils#187
@kdudka
Copy link
Member Author

kdudka commented Nov 11, 2024

@siteshwar Thanks for review and testing!

@kdudka kdudka merged commit 187390a into csutils:main Nov 11, 2024
40 checks passed
@kdudka kdudka deleted the gcc-sarif branch November 11, 2024 12:49
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