@@ -407,14 +407,21 @@ func Test_sarifPrint(t *testing.T) {
407407 "driver": {
408408 "informationUri": "https://github.com/terraform-linters/tflint",
409409 "name": "tflint-errors",
410- "rules": [],
410+ "rules": [
411+ {
412+ "id": "application_error",
413+ "shortDescription": {
414+ "text": ""
415+ }
416+ }
417+ ],
411418 "version": "%s"
412419 }
413420 },
414421 "results": [
415422 {
416423 "ruleId": "application_error",
417- "ruleIndex": 18446744073709551615 ,
424+ "ruleIndex": 0 ,
418425 "level": "error",
419426 "message": {
420427 "text": "Failed to work; I don't feel like working"
@@ -462,14 +469,21 @@ func Test_sarifPrint(t *testing.T) {
462469 "driver": {
463470 "informationUri": "https://github.com/terraform-linters/tflint",
464471 "name": "tflint-errors",
465- "rules": [],
472+ "rules": [
473+ {
474+ "id": "summary",
475+ "shortDescription": {
476+ "text": ""
477+ }
478+ }
479+ ],
466480 "version": "%s"
467481 }
468482 },
469483 "results": [
470484 {
471485 "ruleId": "summary",
472- "ruleIndex": 18446744073709551615 ,
486+ "ruleIndex": 0 ,
473487 "level": "warning",
474488 "message": {
475489 "text": "detail"
@@ -535,30 +549,43 @@ func Test_sarifPrint(t *testing.T) {
535549 "driver": {
536550 "informationUri": "https://github.com/terraform-linters/tflint",
537551 "name": "tflint-errors",
538- "rules": [],
552+ "rules": [
553+ {
554+ "id": "application_error",
555+ "shortDescription": {
556+ "text": ""
557+ }
558+ },
559+ {
560+ "id": "summary",
561+ "shortDescription": {
562+ "text": ""
563+ }
564+ }
565+ ],
539566 "version": "%s"
540567 }
541568 },
542569 "results": [
543570 {
544571 "ruleId": "application_error",
545- "ruleIndex": 18446744073709551615 ,
572+ "ruleIndex": 0 ,
546573 "level": "error",
547574 "message": {
548575 "text": "an error occurred"
549576 }
550577 },
551578 {
552579 "ruleId": "application_error",
553- "ruleIndex": 18446744073709551615 ,
580+ "ruleIndex": 0 ,
554581 "level": "error",
555582 "message": {
556583 "text": "failed"
557584 }
558585 },
559586 {
560587 "ruleId": "summary",
561- "ruleIndex": 18446744073709551615 ,
588+ "ruleIndex": 1 ,
562589 "level": "warning",
563590 "message": {
564591 "text": "detail"
0 commit comments