Skip to content

fix: yr check should notify the users of all errors#597

Merged
plusvic merged 3 commits intoVirusTotal:mainfrom
tlansec:fix/yr-check-notify-on-all-errors
Mar 20, 2026
Merged

fix: yr check should notify the users of all errors#597
plusvic merged 3 commits intoVirusTotal:mainfrom
tlansec:fix/yr-check-notify-on-all-errors

Conversation

@tlansec
Copy link
Contributor

@tlansec tlansec commented Mar 19, 2026

yr check now notifies the user of all the errors it encounters rather than just the first one:

~/Documents/gitcontrib/yara-x git:(main) ✗ target/debug/yr.exe -C tltest/test.toml check tltest/lol.yar
error[E038]: required metadata is missing
 --> tltest/lol.yar:1:6
  |
1 | rule ayy : APT AYY{
  |      ^^^ required metadata `date` not found
error[E038]: required metadata is missing
 --> tltest/lol.yar:1:6
  |
1 | rule ayy : APT AYY{
  |      ^^^ required metadata `severity` not found
error[E039]: rule name does not match regex `^[A-Z][a-zA-Z0-9]+_[A-Z][a-zA-Z0-9_]+$`
 --> tltest/lol.yar:1:6
  |
1 | rule ayy : APT AYY{
  |      ^^^ this rule name does not match regex `^[A-Z][a-zA-Z0-9]+_[A-Z][a-zA-Z0-9_]+$`
error[E038]: required metadata is missing
 --> tltest/lol.yar:1:6
  |
1 | rule ayy : APT AYY{
  |      ^^^ required metadata `author` not found
[ FAIL ] tltest/lol.yar
0 file(s) ok. warnings: 0. errors: 4.

@google-cla
Copy link

google-cla bot commented Mar 19, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@tlansec tlansec force-pushed the fix/yr-check-notify-on-all-errors branch from e8868eb to d595a46 Compare March 19, 2026 15:50
@tlansec tlansec changed the title Fix #596: yr check should notify the users of all errors fix: #596yr check should notify the users of all errors Mar 19, 2026
@tlansec
Copy link
Contributor Author

tlansec commented Mar 19, 2026

Hmm - it looks like its breaking the tests? I'll look into that tomorrow :(.

@plusvic plusvic enabled auto-merge (squash) March 20, 2026 08:21
@plusvic plusvic changed the title fix: #596yr check should notify the users of all errors fix: yr check should notify the users of all errors Mar 20, 2026
@plusvic plusvic disabled auto-merge March 20, 2026 08:21
@plusvic plusvic enabled auto-merge (squash) March 20, 2026 08:22
@plusvic plusvic merged commit f8169ea into VirusTotal:main Mar 20, 2026
14 checks passed
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