8000 GitHub - ScopeLift/scopelint at v0.0.10
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ScopeLift/scopelint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScopeLint

A simple and opinionated tool designed to for basic formatting/linting of Solidity and TOML code in foundry projects.

Overview

Solidity formatting uses the configuration in foundry.toml, and TOML formatting has a hardcoded configuration.

Formatting and checking does the following:

  • Runs forge fmt to format Solidity.
  • Uses the taplo crate to format TOML.
  • Validates test names follow a convention of test(Fork)?(Fuzz)?_(Revert(If_|When_){1})?\w{1,}.
  • Validates constants and immutables are in ALL_CAPS.
  • Validates function names and visibility in forge scripts to 1 public run method per script.
  • Validates internal functions in src/ start with a leading underscore.

Usage

  • Install with cargo install scopelint.
  • Format code with scopelint fmt.
  • Validate formatting with scopelint check.
  • Use the ScopeLift foundry template to automatically run scopelint and slither in CI.

Limitations

  1. This tool is currently opinionated and does not let you configure it's behavior.
  2. It's regex-based, so it may not be perfect—for example, it doesn't care that code is commented out.

About

An opinionated formatting and linting tool for foundry projects

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0