You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In "os" package, os.SEEK_SET, os.SEEK_CUR and os.SEEK_END are deprecated and are suggested to be replaced with: io.SeekStart, io.SeekCurrent, and io.SeekEnd.
// Seek whence values.//// Deprecated: Use io.SeekStart, io.SeekCurrent, and io.SeekEnd.const (
SEEK_SETint=0// seek relative to the origin of the fileSEEK_CURint=1// seek relative to the current offsetSEEK_ENDint=2// seek relative to the end
)
Currently, the fact_deprecated analyzer is unable to detect SEEK_CUR and SEEK_END and just marks SEEK_SET as deprecated.
Because of this bug SA1019 check is also affected (there might be more).
The text was updated successfully, but these errors were encountered:
dominikh
changed the title
Unhandled cases in fact_deprecated analyzer
SA1019: only first object in a declaration group gets marked as deprecated
Aug 19, 2022
Consider the following case:
Reference: https://cs.opensource.google/go/go/+/refs/tags/go1.19:src/os/file.go;l=88
In "os" package,
os.SEEK_SET
,os.SEEK_CUR
andos.SEEK_END
are deprecated and are suggested to be replaced with:io.SeekStart
,io.SeekCurrent
, andio.SeekEnd
.Currently, the
fact_deprecated
analyzer is unable to detectSEEK_CUR
andSEEK_END
and just marksSEEK_SET
as deprecated.Because of this bug
SA1019
check is also affected (there might be more).The text was updated successfully, but these errors were encountered: