<commit_before># SmartSmells

### Info

SmartSmells is a code smell detector for java powered by javaparser.
Current found smells are:

- GodClass
- FeatureEnvy
- DataClass
- LongMethod
- LongParameterList
- ComplexMethod
- LargeClass
- CommentSmell
- Cycle
- Deadcode
- MessageChain
- MiddleMan

### Installation

- cd {path}/SmartSmells
- gradle unitTest to verify all tests
- gradle fatJar to build an executable jar

### Usage

- After installing SmartSmells and copying the default-config.yaml to a location you are aware of, you can start SmartSmells with:

- java -jar SmartSmells.jar --input "/path/to/project" --config "path/to/default-config.yaml" --output "path/to/output.xml"

- Shortkeys are: '-i', '-c', '-o'
<commit_msg>Add section `how to use smartsmells as a gadle task`<commit_after># SmartSmells

### Info

SmartSmells is a code smell detector for java powered by javaparser.
Current found smells are:

- GodClass
- FeatureEnvy
- DataClass
- LongMethod
- LongParameterList
- ComplexMethod
- LargeClass
- CommentSmell
- Cycle
- Deadcode
- MessageChain
- MiddleMan

### Installation

- cd {path}/SmartSmells
- gradle unitTest to verify all tests
- gradle fatJar to build an executable jar

### Usage

- After installing SmartSmells and copying the default-config.yaml to a location you are aware of, you can start SmartSmells with:

- java -jar SmartSmells.jar --input "/path/to/project" --config "path/to/default-config.yaml" --output "path/to/output.xml"

- Shortkeys are: '-i', '-c', '-o'

### As Gradle task

Following lines will create a `gradle smartsmells` task which can be executed from the console.

```groovy
configurations {
	smartsmells
}

task smartsmells(type: JavaExec) {
	main = "io.gitlab.arturbosch.smartsmells.Main"
	classpath = configurations.smartsmells
	def input = "$project.projectDir.absolutePath"
	def output = "$project.projectDir/smartsmells.xml"
	def params = [ '-i', input, '-o', output, '-f']
	args(params)
}

dependencies {
	smartsmells 'io.gitlab.arturbosch.smartsmells:SmartSmells:M7'
}
```

{'fraction_non_alphanumeric': 0.10866372980910426, 'fraction_numerical': 0.0004894762604013706, 'mean_word_length': 4.046913580246914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1578358', 'n_tokens_mistral': 675, 'n_tokens_neox': 646, 'n_words': 214}