Comments (3)
I'm sure a single /;
at the top, like in the original input, is the vast majority of uses of /;
. I will take care of this single case for now, and then see if anyone ever complains about the more complicated cases and think of what to do when the time comes.
My philosophy is that it i good to still have some warning for Graph[{1->2, 1->3}]
, even at very low confidence (0.1), because of copy/paste typos.
from codeinspector.
This is interesting because of how Condition
(/;
) works and where it can be placed.
Technically, even this is fine to do:
foo[a_, b_] :> Module[{c}, c = (a === b); bar2[a, b] /; c]
The docs for Condition
mention that.
(Obviously, the use of Condition
in Module
probably happens more with function definitions than simple pattern replacements.)
I wonder how much work CodeInspector should do to find the extremely context-sensitive Condition
that may be buried somewhere. I will have to think about what to do.
from codeinspector.
I would think that using Module
with :>
(instead of :=
) is an extremely rare use case. A linter can't avoid false positives and be still useful.
BTW I regularly disable this lint because it always triggers on things like Graph[{1->2, 1->3}]
.
from codeinspector.
Related Issues (13)
- CodeInspectBoxSummarize[File["path"]] causes errors HOT 2
- Publish 1.2 to paclet server HOT 2
- Error Get::noopen: Cannot open CodeFormatter`. HOT 1
- Why are sessionSymbols considered suspicious? HOT 2
- Some important CodeInspect hints do not get shown (too low confidence?) HOT 1
- Generalize OptionsPattern inspection HOT 2
- OptionsPattern inspection should not trigger within SyntaxInformation HOT 3
- Add textual output support for CLI usage HOT 6
- Avoid scanBadSymbols to be Error. HOT 6
- CodeInspect does not know about ApplyTo sugar HOT 3
- Resolution of Language specific messages HOT 1
- Warnings about letterlike characters in identifiers HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeinspector.