-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consistency in cabal files #196
Comments
Potentially. It's not enough that they be consistent. They'd have to conform to some written rules, otherwise it becomes a situation where the most repeated formatting "mistakes" could win. We currently don't have any written rules, but I'd be open to having something. I don't have a ton of time, but I can take a quick look if someone wants to give it a shot. But personally, it bugs me more that we don't have a consistent style for Haskell files. |
KS' current cabal style guide and Haskell style guide are available online. The license is CC-By-NC-SA, in case anyone needs to adapt them. Would that be good starting points? |
Thanks. I probably won't have time very soon to take a deep look but I'll respond as soon as I can. |
I'm really not going to have time to review this soon. Anything that can be done to shorten the amount of time necessary to make a decision would be highly appreciated (e.g., divide this in two tasks; select fewer rules, more direct rules, etc.). |
Include missing license in Cabal file.
Include missing license in Cabal file.
…- 3). Refs #196. Move source repository declaration to head of file, following style guide.
Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
sort modules in exposed-modules in library in alphabetical order.
Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
…196. Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
…196. Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
…196. Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
…196. Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
…196. Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
Modules listed in fields such as exposed-modules and other-modules should always be listed in alphabetical order, one module per line.
….7.3). Refs #196. Packages listed in fields such as build-depends should always be listed one package per line, with the comma that separates items being the first character in the line.
….7.3). Refs #196. Packages listed in fields such as build-depends should always be listed one package per line, with the comma that separates items being the first character in the line.
….7.3). Refs #196. Packages listed in fields such as build-depends should always be listed one package per line, with the comma that separates items being the first character in the line.
…196. A Cabal file consists of, in order: 1. License or copyright information 2. Cabal version declaration and build type declaration 3. Package metadata 4. Source repository declarations, if present 5. Flag declarations, if present 6. Libraries, if present 7. Executables, if present 8. Tests, if present 9. Benchmarks, if present
A Cabal file consists of, in order: 1. License or copyright information 2. Cabal version declaration and build type declaration 3. Package metadata 4. Source repository declarations, if present 5. Flag declarations, if present 6. Libraries, if present 7. Executables, if present 8. Tests, if present 9. Benchmarks, if present
Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
….7.2). Refs #196. Modules listed in fields such as exposed-modules and other-modules should always be listed in alphabetical order, one module per line.
Packages listed in fields such as build-depends should always be listed one package per line, with the comma that separates items being the character in the line.
For all settings in libraries, executables, tests and benchmarks, their values should be set in a new line.
A single blank line always appears: 1. Between consecutive sections. 2. Between consecutive entries of a section.
A single ASCII space also appears in the following places: - On both sides of any binary or ternary operator.
Horizontal alignment is required in the following: - For the values of the fields denoting the Cabal version, the build type, and other package metadata, except when the values of those fields are given in a separate line.
Horizontal alignment is strongly encouraged in the following: - For lower and upper version bounds of libraries listed together within build-depends fields.
Other package metadata should follow the package name in the following order. - name - version - author - maintainer - homepage - license - license-file - copyright - category - synopsis - description - data-files, if applicable
Fields within library, executable, test suites and benchmarks are listed in the following order: - type, if applicable - main-is, if applicable - exposed-modules, if applicable - other-modules, if applicable - build-depends - default-language - hs-source-dirs - compiler options - flag-dependent configuration
….7.2). Refs #196. Modules listed in fields such as exposed-modules and other-modules should always be listed in alphabetical order, one module per line.
Packages listed in fields such as build-depends should always be listed one package per line, with the comma that separates items being the character in the line.
For all settings in libraries, executables, tests and benchmarks, their values should be set in a new line.
A single blank line always appears: 1. Between consecutive sections. 2. Between consecutive entries of a section.
A single ASCII space also appears in the following places: - On both sides of any binary or ternary operator.
Horizontal alignment is required in the following: - For the values of the fields denoting the Cabal version, the build type, and other package metadata, except when the values of those fields are given in a separate line.
Horizontal alignment is strongly encouraged in the following: - For lower and upper version bounds of libraries listed together within build-depends fields.
The files have been cleaned based on that guide. I haven't done anything regarding the Haskell files. That may take much longer. |
The cabal files do not have consistent syntax. For example, some times, a space is left before
:
. Sometimes it is not. Some keywords are all lowercase, some mix cases.Would you accept a PR that standardizes the syntax of all cabal files?
The text was updated successfully, but these errors were encountered: