Comments (5)
I wonder if we could put a PR into Path::Tiny to extend the lines, to have a start_at option.
my $start = $violation_line - $config_plus_minus;
@violation_area = $file->lines(
{
start_at => $start < 0 ? 0 : $start,
count => ($config_plus_minus * 2) + 1
}
);
Other wise we'll just have to make out own file splice subroutine.
(sorry for the edit spam)
from p5-app-critique.
Or thinking about it, File::Tie could be an option.
from p5-app-critique.
Actually I was thinking I could use the PPI nodes to get the info. Traverse up to the parent node, note the line number, render the parent node and trim the resulting string appropriately.
That said, I've not tried to do this yet :)
On Sep 4, 2016, at 22:39, Stuart Skelton [email protected] wrote:
Or thinking about it, File::Tie could be an option.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from p5-app-critique.
I look forward to seeing that commit chain.
On 5 Sep 2016 8:35 a.m., "Stevan Little" [email protected] wrote:
Actually I was thinking I could use the PPI nodes to get the info.
Traverse up to the parent node, note the line number, render the parent
node and trim the resulting string appropriately.That said, I've not tried to do this yet :)
On Sep 4, 2016, at 22:39, Stuart Skelton [email protected]
wrote:Or thinking about it, File::Tie could be an option.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAc1FnhhxWD964OTbjQqEcLtG9RgCgc6ks5qm8Y5gaJpZM4J0l37
.
from p5-app-critique.
Haha, me too ;)
from p5-app-critique.
Related Issues (19)
- Write a set of admin commands for managing `~/.critique` directories
- Convert the methods in ::Command into Plugins
- Move to Path::Tiny HOT 1
- Fix startup time issue on large repos HOT 1
- Bash completion for App::Critique
- Add support for `~/.critique/config.json` HOT 1
- add in a --local option to init
- add file filter information to the `status` output
- make `status` report on a single file
- i18n the output
- Add re-check/scan option to post-edit prompt HOT 4
- Add option for `git add -p` HOT 1
- Default when editing a commit message HOT 1
- Wishlist: Support for colorized diffs HOT 5
- Wishlist: Option to go directly into editor when violations found HOT 6
- critique doesn't recover from perlcritic crash
- critique dies when a file is removed HOT 5
- Storable error via Parallel::ForkManager
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 p5-app-critique.