Skip to content
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

Add support for allowed package-to-symbol prefix mappings #177

Merged
merged 4 commits into from
Jun 10, 2020

Conversation

zzamboni
Copy link
Contributor

@zzamboni zzamboni commented Jun 9, 2020

Valid mappings are stored in package-lint--allowed-prefix-mappings. Its default value is:

'(("ox-" . ("org-"))
  ("ob-" . ("org-")))

This means that in packages starting with "ox-" and "ob-", functions and symbols starting with "org-" are allowed. After the mapping, the symbols still must match the whole package match. For example, in package "ox-foobar", symbols starting with "org-foobar" will be allowed.

Fixes #89.

Valid mappings are stored in
`package-lint--allowed-prefix-mappings`. Its default value is:

    '(("ox-" . ("org-"))
      ("ob-" . ("org-")))

This means that in packages starting with "ox-" and "ob-", functions
and symbols starting with "org-" are allowed. After the mapping, the
symbols still must match the whole package match. For example, in
package "ox-foobar", symbols starting with "org-foobar" will be
allowed.

Fixes purcell#89.
@purcell
Copy link
Owner

purcell commented Jun 10, 2020

Nice, thanks. Would you be able to provide a few little tests please? It should be pretty easy with the setup we've got: just load up package-lint.el and package-lint-tests.el with your changes, and then use the interactive ert commands to run the tests.

Added one positive and one negative test.
@zzamboni
Copy link
Contributor Author

@purcell thanks for the pointer - I've added two checks, one for a valid prefix mapping and one for an invalid one. Please let me know if anything should be changed or done differently.

package-lint-test.el Outdated Show resolved Hide resolved
@Fanael Fanael merged commit 15d3a13 into purcell:master Jun 10, 2020
@Fanael
Copy link
Contributor

Fanael commented Jun 10, 2020

Thanks!

1 similar comment
@zzamboni
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Org exporter packages to follow a different namespace convention
3 participants