yearn-vaults icon indicating copy to clipboard operation
yearn-vaults copied to clipboard

Add linting to CI for Vyper files

Open chriswessels opened this issue 4 years ago • 16 comments

Currently have linting for Python and Solidity files, but not Vyper.

Add linting support + hook up to Github workflows.

chriswessels avatar Oct 14 '20 17:10 chriswessels

Note: a tool doesn't exist for this yet, but it is possible to make one using Vyper's public API (which can output the AST)

fubuloubu avatar Oct 14 '20 17:10 fubuloubu

I'm looking into creating such a tool. Is there any chance for compensation in case it resolves this issue? (Not asking for specific numbers, but would be nice to get something)

spinoch avatar Oct 28 '20 15:10 spinoch

@spinoch yes! I think I can find some individuals that can put together a bounty if you are willing to help take this on!

fubuloubu avatar Oct 28 '20 16:10 fubuloubu

Cool. I'll see if I can come up with something by next week

spinoch avatar Oct 29 '20 15:10 spinoch

Hey @spinoch! It seems that you've done a lot of progress in the PR. Are you still working on it?

saltyfacu avatar Mar 01 '21 09:03 saltyfacu

Hey, @fameal . In short, no. We need to fix a few issues in the blackadder repo and I haven't had time lately. I still would like to get the issues fixed but I can't really give a time frame atm

spinoch avatar Mar 02 '21 16:03 spinoch

I have submitted a PR to fix this outstanding issue. https://github.com/yearn/yearn-vaults/pull/479

0xbeedao avatar Oct 24 '21 21:10 0xbeedao

We need someone to build and maintain a linter. The linter should be able to work with multiple versions of vyper

pandadefi avatar Dec 08 '21 08:12 pandadefi

We need someone to build and maintain a linter. The linter should be able to work with multiple versions of vyper

note that @spinoch made a first cut of it here: https://github.com/vyperlang/blackadder

fubuloubu avatar Dec 10 '21 21:12 fubuloubu

@fubuloubu I would like try to finish the remaining work. I have looked through the PR(https://github.com/yearn/yearn-vaults/pull/52), the remaining work is to (correctly) reformat code for mutability of the method, am I right?

AbnerZheng avatar Apr 28 '22 16:04 AbnerZheng

@fubuloubu I would like try to finish the remaining work. I have looked through the PR(#52), the remaining work is to (correctly) reformat code for mutability of the method, am I right?

No, there is updates needed to the tool for it to work

fubuloubu avatar Apr 28 '22 17:04 fubuloubu

@fubuloubu Yeah, I have checked the tool(https://github.com/vyperlang/blackadder), currently it is simply based on regexp, should I modified it according to the AST to make a normal formatter? Or maybe fork the black(https://github.com/psf/black), and modified the code according to the grammar rule of Vyper?

AbnerZheng avatar Apr 28 '22 17:04 AbnerZheng

@fubuloubu Yeah, I have checked the tool(https://github.com/vyperlang/blackadder), currently it is simply based on regexp, should I modified it according to the AST to make a normal formatter? Or maybe fork the black(https://github.com/psf/black), and modified the code according to the grammar rule of Vyper?

Will accept PRs to that repo, yes

fubuloubu avatar Apr 28 '22 17:04 fubuloubu

Cool, I will try it.

AbnerZheng avatar Apr 28 '22 17:04 AbnerZheng

Is there any advance in creating a linter for vyper ?

dbale-altoros avatar Feb 10 '23 15:02 dbale-altoros

actually yeah, https://github.com/vyperlang/mamushi got a little further in terms of what it can do

fubuloubu avatar Feb 10 '23 17:02 fubuloubu