README.md 1.4 KB
Newer Older
Coraline Ehmke's avatar
Coraline Ehmke committed
1 2
# Snuffle

3 4 5
Snuffle analyzes source code to identify "data clumps", clusters of attributes
that are often used together. It uses this analysis to propose objects that
may be extracted from a given class.
Coraline Ehmke's avatar
Coraline Ehmke committed
6

7 8
## TODO

Coraline Ehmke's avatar
Coraline Ehmke committed
9
* Report cohorts with line numbers
Coraline Ehmke's avatar
Coraline Ehmke committed
10 11
* Ignore data clumps called in "loose" class methods (e.g. attr_accessor)
* Consider weighting based on match type
12

Coraline Ehmke's avatar
Coraline Ehmke committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
## Installation

Add this line to your application's Gemfile:

    gem 'snuffle'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install snuffle

## Usage

Coraline Ehmke's avatar
Coraline Ehmke committed
29 30 31 32 33 34 35
    $ snuffle check example.rb

    +----------------------------+------------+-----------------------------+
    |          Filename          | Host Class | Candidate Object Attributes |
    +----------------------------+------------+-----------------------------+
    | example.rb                 | Customer   | company_name, customer_name |
    +----------------------------+------------+-----------------------------+
Coraline Ehmke's avatar
Coraline Ehmke committed
36 37 38

## Contributing

39 40 41
Please note that this project is released with a [Contributor Code of Conduct](https://gitlab.com/coraline/snuffle/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

1. Fork the project
Coraline Ehmke's avatar
Coraline Ehmke committed
42 43 44
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
45
5. Create a new Merge Request