Comments (3)
I know GitHub is supposed to be almost completely a meme-free zone, but speaking of truncation...
from go-ruleguard.
After thinking about this more perhaps a better solution would be to truncate the value instead of increasing the limit. PR for truncating the value #71
from go-ruleguard.
Since ruleguard is a CLI tool, it's always good to have a human-readable output that does not annoy the user.
With matcher variables, there is a risk that submatch will be huge. For example, it may occupy several source lines (100+) if you're matching the statement. Everything inside that statement will be embedded in the message. This will make a single message 1000+ characters long, which might be disappointing as it clutters the output.
The limit was a solution to filter out things that we probably don't want to interpolate. Your truncation idea is good as well, although it doesn't help with statements a lot (a more structural truncation/shortening would be better here).
from go-ruleguard.
Related Issues (20)
- Why does ':=' and '=' match differently? (short var declaration vs regular) HOT 2
- panic in runner.go:113 HOT 2
- Not working while importing golangci-lint under deeper packages. HOT 2
- Re-implement xtypes using the newer version of go/types
- panic with generics HOT 1
- Should not recommend to use `ignore` build tag HOT 5
- Ability to check if a match is within a method implementing interface (or method name matches) HOT 2
- Slow rule speed HOT 1
- ruleguard allows rules to be in any package
- [help needed] rule for missing ellipsis in forwarded arg HOT 11
- Ability to match on a non-deferred function call only HOT 2
- [go 1.20] Ruleguard intermittently failing with invalid compilation errors
- /x/tools dependency is too old, causes flaky interface satisfaction failures HOT 1
- Text matcher not behaving as expected HOT 2
- Support for string constexpr evaluation HOT 2
- go1.21: load rules: parse rules file: typechecker error: ...: could not import HOT 22
- Allow filtering by package name (not just path)
- Loop and Configuration HOT 1
- Go 1.22 compatibility HOT 2
- Is it possible to match implementors of generic interfaces? HOT 1
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 go-ruleguard.