-
-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add buildifier, blade-formatter, blue, haml-lint, textlint, vul…
…ture, cfn-lint (#255) Co-authored-by: William Boman <[email protected]>
- Loading branch information
1 parent
b425364
commit 5734723
Showing
10 changed files
with
140 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
local Pkg = require "mason-core.package" | ||
local npm = require "mason-core.managers.npm" | ||
|
||
return Pkg.new { | ||
name = "blade-formatter", | ||
desc = [[An opinionated blade template formatter for Laravel that respects readability]], | ||
homepage = "https://github.com/shufo/blade-formatter", | ||
languages = { Pkg.Lang.Blade }, | ||
categories = { Pkg.Cat.Formatter }, | ||
install = npm.packages { "blade-formatter", bin = { "blade-formatter" } }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
local Pkg = require "mason-core.package" | ||
local pip3 = require "mason-core.managers.pip3" | ||
local _ = require "mason-core.functional" | ||
|
||
return Pkg.new { | ||
name = "blue", | ||
desc = _.dedent [[ | ||
blue is a somewhat less uncompromising code formatter than black, the OG of Python formatters. We love the idea | ||
of automatically formatting Python code, for the same reasons that inspired black, however we take issue with | ||
some of the decisions black makes. Kudos to black for pioneering code formatting for Python, and for its | ||
excellent implementation. | ||
]], | ||
homepage = "https://blue.readthedocs.io/en/latest/", | ||
languages = { Pkg.Lang.Python }, | ||
categories = { Pkg.Cat.Formatter }, | ||
install = pip3.packages { "blue", bin = { "blue" } }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
local Pkg = require "mason-core.package" | ||
local github = require "mason-core.managers.github" | ||
local std = require "mason-core.managers.std" | ||
local _ = require "mason-core.functional" | ||
local platform = require "mason-core.platform" | ||
|
||
local coalesce, when = _.coalesce, _.when | ||
|
||
return Pkg.new { | ||
name = "buildifier", | ||
desc = [[buildifier is a tool for formatting and linting bazel BUILD, WORKSPACE, and .bzl files.]], | ||
homepage = "https://github.com/bazelbuild/buildtools", | ||
languages = { Pkg.Lang.Bazel }, | ||
categories = { Pkg.Cat.Linter, Pkg.Cat.Formatter }, | ||
---@async | ||
---@param ctx InstallContext | ||
install = function(ctx) | ||
github | ||
.download_release_file({ | ||
repo = "bazelbuild/buildtools", | ||
out_file = platform.is.win and "buildifier.exe" or "buildifier", | ||
asset_file = coalesce( | ||
when(platform.is.mac_x64, "buildifier-darwin-amd64"), | ||
when(platform.is.mac_arm64, "buildifier-darwin-arm64"), | ||
when(platform.is.linux_x64, "buildifier-linux-amd64"), | ||
when(platform.is.linux_arm64, "buildifier-linux-arm64"), | ||
when(platform.is.win_x64, "buildifier-windows-amd64.exe") | ||
), | ||
}) | ||
.with_receipt() | ||
std.chmod("+x", { "buildifier" }) | ||
ctx:link_bin("buildifier", platform.is.win and "buildifier.exe" or "buildifier") | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
local Pkg = require "mason-core.package" | ||
local pip3 = require "mason-core.managers.pip3" | ||
local _ = require "mason-core.functional" | ||
|
||
return Pkg.new { | ||
name = "cfn-lint", | ||
desc = _.dedent [[ | ||
CloudFormation Linter. Validate AWS CloudFormation YAML/JSON templates against the AWS CloudFormation Resource | ||
Specification and additional checks. Includes checking valid values for resource properties and best practices. | ||
]], | ||
homepage = "https://github.com/aws-cloudformation/cfn-lint", | ||
languages = { Pkg.Lang.YAML, Pkg.Lang.JSON }, | ||
categories = { Pkg.Cat.Linter }, | ||
install = pip3.packages { "cfn-lint", bin = { "cfn-lint" } }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
local Pkg = require "mason-core.package" | ||
local gem = require "mason-core.managers.gem" | ||
local _ = require "mason-core.functional" | ||
|
||
return Pkg.new { | ||
name = "haml-lint", | ||
desc = _.dedent [[ | ||
haml-lint is a tool to help keep your HAML files clean and readable. In addition to HAML-specific style and lint | ||
checks, it integrates with RuboCop to bring its powerful static analysis tools to your HAML documents. | ||
]], | ||
homepage = "https://github.com/sds/haml-lint", | ||
languages = { Pkg.Lang.HAML }, | ||
categories = { Pkg.Cat.Linter }, | ||
install = gem.packages { "haml_lint", bin = { "haml-lint" } }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
local Pkg = require "mason-core.package" | ||
local npm = require "mason-core.managers.npm" | ||
|
||
return Pkg.new { | ||
name = "textlint", | ||
desc = [[The pluggable natural language linter for text and markdown.]], | ||
homepage = "https://textlint.github.io", | ||
languages = { Pkg.Lang.Text, Pkg.Lang.Markdown }, | ||
categories = { Pkg.Cat.Linter }, | ||
install = npm.packages { "textlint", bin = { "textlint" } }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
local Pkg = require "mason-core.package" | ||
local pip3 = require "mason-core.managers.pip3" | ||
local _ = require "mason-core.functional" | ||
|
||
return Pkg.new { | ||
name = "vulture", | ||
desc = _.dedent [[ | ||
Vulture finds unused code in Python programs. This is useful for cleaning up and finding errors in large code | ||
bases. If you run Vulture on both your library and test suite you can find untested code. | ||
Due to Python's dynamic nature, static code analyzers like Vulture are likely to miss some dead code. Also, code | ||
that is only called implicitly may be reported as unused. Nonetheless, Vulture can be a very helpful tool for | ||
higher code quality. | ||
]], | ||
homepage = "https://github.com/jendrikseipp/vulture", | ||
languages = { Pkg.Lang.Python }, | ||
categories = { Pkg.Cat.Linter }, | ||
install = pip3.packages { "vulture", bin = { "vulture" } }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters