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

👻 count analysis tags only. #137

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions analysis/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ func TestApplicationAnalysis(t *testing.T) {
if len(got.Incidents) != len(expected.Incidents) {
t.Errorf("Different amount of incidents error. Got %d, expected %d.", len(got.Incidents), len(expected.Incidents))
missing, unexpected := getIncidentsDiff(expected.Incidents, got.Incidents)
for _, incident := range missing {
for _, incident := range missing {
fmt.Printf("Expected incident not found: %s line %d.\n", incident.File, incident.Line)
}
for _, incident := range unexpected {
}
for _, incident := range unexpected {
fmt.Printf("Unexpected incident found: %s line %d.\n", incident.File, incident.Line)
}
}

} else {
// Ensure stable order of Incidents.
Expand Down Expand Up @@ -288,8 +288,8 @@ func TestApplicationAnalysis(t *testing.T) {

// Check Tags (if specified by TestCase).
if len(tc.AnalysisTags) > 0 {
if len(tc.AnalysisTags) != len(gotApp.Tags) {
t.Errorf("Different Tags amount error. Got: %d, expected: %d.\n", len(gotApp.Tags), len(tc.AnalysisTags))
if len(tc.AnalysisTags) != len(gotTags) {
t.Errorf("Different Tags amount error. Got: %d, expected: %d.\n", len(gotTags), len(tc.AnalysisTags))
notFoundTags, unexpectedTags := getTagsDiff(tc.AnalysisTags, gotTags)
for _, notFoundTag := range notFoundTags {
pp.Println("Expected tag not found", notFoundTag)
Expand Down
Loading