Comments (3)
Reproducing the discussed problem + solution here for others' reference:
Problem
normally, all plugins in solium are supposed to be installed separately by the dev.
exception is the security plugin solium-plugin-security - it comes installed as a local dependancy in solium (for convenience of user)
this plugin has solium installed as a dev dependancy (this is required bc solium is what will run the plugin's tests)
Now when you add new rules to the plugin in your dev environment & run the test with new configuration, solium (dev-dependancy) requires the plugin. But it doesn't require this plugin that you're working on. Instead it requires the one installed inside it as local dep.
So right now what you did was to remove all plugin modules within solium's reach and make your modified plugin globally available so Solium requires the modified one.
Apologies for this convoluted mess -.-", feel free to clarify anything you don't understand
Solution
Clone this repo and download all deps npm i --dev
Be in the plugin's root dir (where you ran npm test)
cd node_modules/solium
npm uninstall --save solium-plugin-security
cd ../..
(back to root dir)npm uninstall --save solium-plugin-security
npm link
(or if this doesn't work)npm link solium-plugin-security
npm test
(You need to do the above only once for every new copy you download)
Bear with this for a while, I'll fix it very soon
from solium-plugin-security.
I updated node to v8.9.1, and now all the tests are failing, all with the same issue. Here's one of the tests:
9) [RULE] enforce-placeholder-last: Acceptances
should accept contracts with bad placeholder style:
TypeError: Cannot read property 'meta' of undefined
at node_modules/solium/lib/rules.js:192:31
at Array.forEach (<anonymous>)
at Object.load (node_modules/solium/lib/rules.js:190:23)
at EventEmitter.lint (node_modules/solium/lib/solium.js:97:32)
at badStyles.forEach.badStyle (test/enforce-placeholder-last.js:74:24)
at Array.forEach (<anonymous>)
at Context.<anonymous> (test/enforce-placeholder-last.js:72:13)
from solium-plugin-security.
Fixed. Now you can set up dev env easily:
git clone ...
cd solium-plugin-security
npm i --dev
npm link / npm link solium-plugin-security
npm test
npm unlink (optional)
from solium-plugin-security.
Related Issues (9)
- no-call-value: recommend only 'transfer' not 'send'
- TODO HOT 3
- Keeping track of Bounty Rules
- plugin can only use solium v1.0.0 as dev dep (no other versions) HOT 1
- Error on new security rules HOT 2
- failures in travis: Unable to load Plugin HOT 1
- npm warning requiring peer of solium HOT 7
- Question concerning rules to enable HOT 6
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 solium-plugin-security.