Skip to content

Commit

Permalink
Merge pull request #12 from commandbox-modules/master
Browse files Browse the repository at this point in the history
Tons of updates
  • Loading branch information
jsteinshouer authored Jun 11, 2020
2 parents ff56dc0 + f22e516 commit 2749213
Show file tree
Hide file tree
Showing 10 changed files with 480 additions and 322 deletions.
62 changes: 62 additions & 0 deletions .cfformat.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"array.empty_padding": false,
"array.padding": true,
"array.multiline.min_length": 40,
"array.multiline.element_count": 2,
"array.multiline.leading_comma.padding": true,
"array.multiline.leading_comma": false,
"alignment.consecutive.assignments": true,
"alignment.consecutive.properties": true,
"alignment.consecutive.params": true,
"brackets.padding": true,
"comment.asterisks": "align",
"binary_operators.padding": true,
"for_loop_semicolons.padding": true,
"function_call.empty_padding": false,
"function_call.padding": true,
"function_call.multiline.leading_comma.padding": true,
"function_call.casing.builtin": "cfdocs",
"function_call.casing.userdefined": "camel",
"function_call.multiline.element_count": 2,
"function_call.multiline.leading_comma": false,
"function_call.multiline.min_length": 40,
"function_declaration.padding": true,
"function_declaration.empty_padding": false,
"function_declaration.multiline.leading_comma": false,
"function_declaration.multiline.leading_comma.padding": true,
"function_declaration.multiline.element_count": 2,
"function_declaration.multiline.min_length": 40,
"function_declaration.group_to_block_spacing": "compact",
"function_anonymous.empty_padding": false,
"function_anonymous.group_to_block_spacing": "compact",
"function_anonymous.multiline.element_count": 2,
"function_anonymous.multiline.leading_comma": false,
"function_anonymous.multiline.leading_comma.padding": true,
"function_anonymous.multiline.min_length": 40,
"function_anonymous.padding": true,
"indent_size": 4,
"keywords.block_to_keyword_spacing": "spaced",
"keywords.group_to_block_spacing": "spaced",
"keywords.padding_inside_group": true,
"keywords.spacing_to_block": "spaced",
"keywords.spacing_to_group": true,
"keywords.empty_group_spacing": false,
"max_columns": 120,
"metadata.multiline.element_count": 3,
"metadata.multiline.min_length": 40,
"method_call.chain.multiline" : 3,
"newline":"\n",
"property.multiline.element_count": 3,
"property.multiline.min_length": 40,
"parentheses.padding": true,
"strings.quote": "double",
"strings.attributes.quote": "double",
"struct.separator": " : ",
"struct.padding": true,
"struct.empty_padding": false,
"struct.multiline.leading_comma": false,
"struct.multiline.leading_comma.padding": true,
"struct.multiline.element_count": 2,
"struct.multiline.min_length": 40,
"tab_indent": true
}
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# http://editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
indent_style = tab
indent_size = 4
tab_width = 4

[*.yml]
indent_style = space
indent_size = 2

[*.{md,markdown}]
trim_trailing_whitespace = false
insert_final_newline = false
8 changes: 8 additions & 0 deletions .markdownlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"line-length": false,
"single-h1": false,
"first-line-h1": false,
"no-multiple-blanks": {
"maximum": 2
}
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 2.3.0

### Added

* Upgraded to store binaries in ForgeBox for faster installations
* Upgraded cflint jar to latest release of v1.5.0
* Added module setting for version loading
* Added formatting rules and script runners: `format, format:check, format:watch`
* Added editor configs for multi-os editing
* Added markdown lint rc

## 2.2.0

* Added JUnit report option
Expand Down
45 changes: 24 additions & 21 deletions ModuleConfig.cfc
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
component {

this.name = "commandbox-cflint";
this.cfmapping = "commandbox-cflint";

function configure() {

}

function onLoad(){

var bundleService = wirebox.getInstance("BundleService@commandbox-cflint");
var jarFile = modulePath & "/lib/CFLint-1.4.1-all/CFLint-1.4.1-all.jar";

if ( !bundleService.isBundleInstalled( "com.cflint.CFLint", "1.4.1" ) ) {
bundleService.installBundle( jarFile );
}

}

}
component {

this.name = "commandbox-cflint";
this.cfmapping = "commandbox-cflint";

function configure(){
settings = { cflint_version : "1.5.0" };
}

function onLoad(){
var bundleService = wirebox.getInstance( "BundleService@commandbox-cflint" );
var jarFile = modulePath & "/lib/CFLint-#settings.cflint_version#-all/CFLint-#settings.cflint_version#-all.jar";

if (
!bundleService.isBundleInstalled(
"com.cflint.CFLint",
settings.cflint_version
)
) {
bundleService.installBundle( jarFile );
}
}

}
122 changes: 61 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
# commandbox-cflint

This is a [CommandBox](https://www.ortussolutions.com/products/commandbox) module for linting your CFML code using [CFLint](https://github.com/cflint/CFLint).

CFLint Version: 1.4.1

## Install

First you will need [CommandBox](https://www.ortussolutions.com/products/commandbox) version 4 or higher installed. Then you can install the commandbox-cflint module using the following command.

```
box install commandbox-cflint
```

## Usage

It can be run on a single file or against a list of files defined by a file globing pattern

```
box cflint **.cfc,**.cfm
```

Run for all components in the models directory.

```
box cflint models/**.cfc
```

Generate html report instead of console output.

```
box cflint models/**.cfc --html
```

Hide INFO level results.

```
box cflint reportLevel=WARNING
```

Hide INFO and WARNING level results.

```
box cflint reportLevel=ERROR
```

Generate a JUnit report

```
box cflint models/**.cfc --junit
```

## Example Output

#### Example Console Output

<img src="https://raw.githubusercontent.com/jsteinshouer/commandbox-cflint/master/examples/cflint-console-example.png" class="img-responsive" />

#### Example HTML Report

<img src="https://raw.githubusercontent.com/jsteinshouer/commandbox-cflint/master/examples/cflint-html-example.png" class="img-responsive" />
# commandbox-cflint

This is a [CommandBox](https://www.ortussolutions.com/products/commandbox) module for linting your CFML code using [CFLint](https://github.com/cflint/CFLint).

CFLint Version: 1.5.0

## Install

First you will need [CommandBox](https://www.ortussolutions.com/products/commandbox) version 4 or higher installed. Then you can install the commandbox-cflint module using the following command.

```
box install commandbox-cflint
```

## Usage

It can be run on a single file or against a list of files defined by a file globing pattern

```
box cflint **.cfc,**.cfm
```

Run for all components in the models directory.

```
box cflint models/**.cfc
```

Generate html report instead of console output.

```
box cflint models/**.cfc --html
```

Hide INFO level results.

```
box cflint reportLevel=WARNING
```

Hide INFO and WARNING level results.

```
box cflint reportLevel=ERROR
```

Generate a JUnit report

```
box cflint models/**.cfc --junit
```

## Example Output

#### Example Console Output

<img src="https://raw.githubusercontent.com/jsteinshouer/commandbox-cflint/master/examples/cflint-console-example.png" class="img-responsive" />

#### Example HTML Report

<img src="https://raw.githubusercontent.com/jsteinshouer/commandbox-cflint/master/examples/cflint-html-example.png" class="img-responsive" />
14 changes: 8 additions & 6 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name":"commandbox-cflint",
"version":"2.2.0",
"version":"2.3.0",
"author":"Jason Steinshouer",
"location":"jsteinshouer/commandbox-cflint#v2.2.0",
"location":"forgeboxStorage",
"homepage":"https://github.com/jsteinshouer/commandbox-cflint",
"documentation":"https://github.com/jsteinshouer/commandbox-cflint",
"repository":{
Expand All @@ -15,16 +15,18 @@
"description":"CommandBox command for running CFLint",
"type":"commandbox-modules",
"dependencies":{
"CFLint-1.4.1-all":"jar:https://github.com/cflint/CFLint/releases/download/CFLint-1.4.1/CFLint-1.4.1-all.jar"
"CFLint-1.5.0-all":"jar:https://github.com/cflint/CFLint/releases/download/CFLint-1.5.0/CFLint-1.5.0-all.jar"
},
"devDependencies":{},
"installPaths":{
"CFLint-1.4.1-all":"lib/CFLint-1.4.1-all"
"CFLint-1.5.0-all":"lib/CFLint-1.5.0-all/"
},
"scripts":{
"postVersion":"package set location='jsteinshouer/commandbox-cflint#v`package version`'",
"onRelease":"publish",
"postPublish":"!git push && !git push --tags"
"postPublish":"!git push && !git push --tags",
"format":"cfformat run commands,models,*.cfc",
"format:check":"cfformat check commands,models,*.cfc",
"format:watch":"cfformat watch commands,models,*.cfc ./.cfformat.json"
},
"ignore":[
"**/.*",
Expand Down
Loading

0 comments on commit 2749213

Please sign in to comment.