www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17207] New: Zero-parameter ' property' function should be

https://issues.dlang.org/show_bug.cgi?id=17207

          Issue ID: 17207
           Summary: Zero-parameter ' property' function should be marked
                    'const', 'inout', or 'immutable'.
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: greeenify gmail.com

There's a nice Dscanner plugin:

std/net/curl.d(2880:19)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/net/curl.d(4101:20)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/net/curl.d(4213:29)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/range/package.d(3295:13)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(3308:14)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7330:10)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7335:7)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7347:7)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7359:16)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7485:10)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7488:22)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7490:22)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7492:16)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7815:18)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7825:18)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7840:20)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7848:20)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7857:26)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7929:22)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(7930:14)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(8064:17)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(8065:18)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(8068:17)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(10589:14)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(10594:14)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(10613:20)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(10622:18)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/package.d(10632:18)[warn]: Zero-parameter ' property' function should
be marked 'const', 'inout', or 'immutable'.
std/range/primitives.d(597:18)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/range/primitives.d(648:14)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/range/primitives.d(655:14)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/parallelism.d(383:10)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(2077:26)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(2231:15)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(2258:22)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(2893:15)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(2926:35)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(2973:15)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(2978:15)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(3000:22)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(3026:14)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(3031:16)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(3205:10)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(3232:9)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/parallelism.d(3858:9)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/random.d(3014:14)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/datetime.d(26573:24)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/datetime.d(27079:24)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/datetime.d(27369:24)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/functional.d(1336:20)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/numeric.d(3252:18)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/numeric.d(3264:7)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/socket.d(3509:63)[warn]: 'const' is not an attribute of the return type.
Place it after the parameter list to clarify.
std/socket.d(3510:57)[warn]: 'const' is not an attribute of the return type.
Place it after the parameter list to clarify.
std/socket.d(3513:43)[warn]: 'const' is not an attribute of the return type.
Place it after the parameter list to clarify.
std/experimental/ndslice/selection.d(1122:18)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/selection.d(1137:22)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/selection.d(1179:22)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/selection.d(1352:23)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/selection.d(1616:18)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/selection.d(1631:22)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/selection.d(1674:23)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/slice.d(1529:10)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/slice.d(1614:10)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/slice.d(1708:14)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/slice.d(1749:14)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/experimental/ndslice/internal.d(161:10)[warn]: Zero-parameter ' property'
function should be marked 'const', 'inout', or 'immutable'.
std/conv.d(4974:15)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/conv.d(5000:26)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/conv.d(5064:7)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/process.d(139:23)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/algorithm/iteration.d(296:14)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/algorithm/iteration.d(346:14)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/algorithm/iteration.d(351:34)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/algorithm/iteration.d(356:7)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/algorithm/iteration.d(361:25)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/algorithm/iteration.d(393:22)[warn]: Zero-parameter ' property' function
should be marked 'const', 'inout', or 'immutable'.
std/uni.d(6421:14)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/uni.d(6426:18)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/uni.d(6438:20)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/uni.d(6472:10)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/uni.d(6473:11)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/uni.d(6524:14)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/uni.d(6529:15)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/uni.d(6547:20)[warn]: Zero-parameter ' property' function should be marked
'const', 'inout', or 'immutable'.
std/exception.d(2143:18)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/concurrency.d(1669:16)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.
std/concurrency.d(1687:13)[warn]: Zero-parameter ' property' function should be
marked 'const', 'inout', or 'immutable'.

--
Feb 20