mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 14:40:29 +00:00
pylint: add module (#2729)
This commit is contained in:
parent
f911ebbec9
commit
e39a9d0103
4 changed files with 40 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -210,6 +210,8 @@
|
||||||
/modules/programs/pubs.nix @loicreynier
|
/modules/programs/pubs.nix @loicreynier
|
||||||
/tests/modules/programs/pubs @loicreynier
|
/tests/modules/programs/pubs @loicreynier
|
||||||
|
|
||||||
|
/modules/programs/pylint.nix @florpe
|
||||||
|
|
||||||
/modules/programs/rbw.nix @ambroisie
|
/modules/programs/rbw.nix @ambroisie
|
||||||
/tests/modules/programs/rbw @ambroisie
|
/tests/modules/programs/rbw @ambroisie
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,12 @@
|
||||||
githubId = 46252070;
|
githubId = 46252070;
|
||||||
name = "Sara Johnsson";
|
name = "Sara Johnsson";
|
||||||
};
|
};
|
||||||
|
florpe = {
|
||||||
|
email = "jens.krewald@gmail.com";
|
||||||
|
github = "florpe";
|
||||||
|
githubId = 53856373;
|
||||||
|
name = "Jens Krewald";
|
||||||
|
};
|
||||||
maximsmol = {
|
maximsmol = {
|
||||||
email = "maximsmol@gmail.com";
|
email = "maximsmol@gmail.com";
|
||||||
github = "maximsmol";
|
github = "maximsmol";
|
||||||
|
|
|
@ -131,6 +131,7 @@ let
|
||||||
./programs/piston-cli.nix
|
./programs/piston-cli.nix
|
||||||
./programs/powerline-go.nix
|
./programs/powerline-go.nix
|
||||||
./programs/pubs.nix
|
./programs/pubs.nix
|
||||||
|
./programs/pylint.nix
|
||||||
./programs/qutebrowser.nix
|
./programs/qutebrowser.nix
|
||||||
./programs/rbw.nix
|
./programs/rbw.nix
|
||||||
./programs/readline.nix
|
./programs/readline.nix
|
||||||
|
|
31
modules/programs/pylint.nix
Normal file
31
modules/programs/pylint.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.programs.pylint;
|
||||||
|
listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault { });
|
||||||
|
iniFormat = pkgs.formats.ini { inherit listToValue; };
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ hm.maintainers.florpe ];
|
||||||
|
options.programs.pylint = {
|
||||||
|
enable = mkEnableOption "the pylint Python linter";
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.python3Packages.pylint;
|
||||||
|
defaultText = literalExpression "pkgs.python3Packages.pylint";
|
||||||
|
description = "The pylint package to use.";
|
||||||
|
};
|
||||||
|
settings = mkOption {
|
||||||
|
type = iniFormat.type;
|
||||||
|
default = { };
|
||||||
|
defaultText = literalExpression "{}";
|
||||||
|
description = "The pylint configuration.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
home.file.".pylintrc".source = iniFormat.generate "pylintrc" cfg.settings;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue