FSharpLint
FSharpLint copied to clipboard
extern declarations cause "Bad usage of failwith:" warning
Description
extern declarations cause "Bad usage of failwith:" warning
Repro steps
Run linter against code:
[<DllImport("LogitechLedEnginesWrapper", CallingConvention=CallingConvention.Cdecl)>]
extern bool LogiLedInit()
[<DllImport("LogitechLedEnginesWrapper", CallingConvention=CallingConvention.Cdecl)>]
extern bool LogiLedSetLighting(int redPercenatge, int greenPercenatge, int bluePercenatge)
Note: must be at least 2 extern declarations
Expected behavior
No errors or warnigns.
Actual behavior
The following warning is issued:
Bad usage of failwith: consider using unique error messages as parameters.
Error on line 5 starting at column 0
extern bool LogiLedSetLighting(int redPercenatge, int greenPercenatge, int bluePercenatge)
^