Git Product home page Git Product logo

Comments (3)

duaraghav8 avatar duaraghav8 commented on July 21, 2024 1

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.

Cisplatin avatar Cisplatin commented on July 21, 2024

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.

duaraghav8 avatar duaraghav8 commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.