bmw-software-engineering / trlc

Treat Requirements Like Code
GNU General Public License v3.0
54 stars 9 forks source link

Linter produces OS dependant output #78

Closed christophkloeffel closed 3 weeks ago

christophkloeffel commented 5 months ago

div_by_zero.rsl:

package Div_By_Zero

type T {
  x Integer
  y Integer
}

checks T {
  x > 2, fatal "x too small"
  y > 2, fatal "y too small"

  100 / (111 - x * y) > 0, "example"
}

output on linux:

100 / (111 - x * y) > 0, "example"
    ^ lint-ug-examples/div_by_zero.rsl:12: issue: divisor could be 0 [vcg-div-by-zero]
    | example record_type triggering error:
    |   T bad_potato {
    |     x = 3
    |     y = 37
    |   }

output on macOS:

100 / (111 - x * y) > 0, "example"
    ^ lint-ug-examples/div_by_zero.rsl:12: issue: divisor could be 0 [vcg-div-by-zero]
    | example record_type triggering error:
    |   T bad_potato {
    |     x = 37
    |     y = 3
    |   }

therefore we will remove this specific test from the tests-system folder until there is a fix for this

florianschanda commented 4 months ago

You can add an options file to the test and specify --no-detailed-info

See https://github.com/bmw-software-engineering/trlc/blob/main/tests-system/lint-vcg-strings/options for an example.