fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
29 stars 16 forks source link

Doc: Describe proper use of long values in expressions #373

Open psmf22 opened 12 months ago

psmf22 commented 12 months ago

The documentation currently does not describe how to properly filter on long values. Using the syntax described for numeric values leads to the following error:

.\fcli.exe util sample-data list -q "longValue==9223372036854775807" Invalid value for option '--query': Expression cannot be parsed; please check expression syntax Message: EL1035E: The value '9223372036854775807' cannot be parsed as an int Source: longValue==9223372036854775807

This seems to be caused by numbers being treated as integers by default. To achieve a proper comparison the number has to be followed by the letter "L". Both uppercase and lowercase notations work.

Working example:

.\fcli.exe util sample-data list -q "longValue==9223372036854775807L"

rsenden commented 12 months ago

I'd suggest documenting only the upper-case L variation as it's more common and easier to recognize; with some fonts, a lowercase l could be easily confused with a 1 (or I, even though that has no meaning here, except maybe for explicitly identifying an Integer)