Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Add line numbers and update tests #43

Closed
wants to merge 1 commit into from

Conversation

mduvall
Copy link

@mduvall mduvall commented Apr 12, 2013

Augmented the RuleSet struct to contain the metadata about the line number, would be useful to help implement #39 and pass the data through redundancy_analyzer.rb.

@zmoazeni
Copy link
Owner

Nice! I have some issue with the implementation, but you definitely figured out the hard part. I forgot parslet returned a "slice".

@zmoazeni
Copy link
Owner

@mduvall I think I'm going to take this one, but I appreciate the PR. We have a file mapping issue in the case where a user runs csscss file1.css file2.css and I don't know how much I love the Metadata stuff. I think we can push this behavior into the class itself and then only deal with it in the tests when we care.

But you certainly hit the nail on the head by using Slice#line_and_column, that was the hard part about this functionality that was eluding me. The rest should be gravy. /cc @kschiess

@mduvall
Copy link
Author

mduvall commented Apr 12, 2013

@zmoazeni Agreed, after some thought it seemed like it would make more sense for the data to be with the declaration, especially since the declaration is specifically on it's own line in most CSS files - thanks for the feedback again :)

@zmoazeni
Copy link
Owner

I'm going to close this unmerged. But I'm planning on spending some time to implement this.

@zmoazeni zmoazeni closed this Apr 18, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants