Sitelet https://github.com/technomancy/slamhound/issues/79
Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

"Invalid token" error when using abbreviated namespaced keywords #79

Description

@joodie

Requiring a namespace using :as alias, then using the alias to refer to a keyword in that namespace throws an error in slamhound.

Given src/my_test.clj:

(ns my-test
  (:require [clojure.test :as test]))
(prn :clojure.test/foo) ;; works but no alias
(prn ::test/foo) ;; this line bugs slamhound

Results in:

> lein run -m slam.hound src/my_test.clj
Failed to reconstruct: #<File src/my_test.clj>
Invalid token: ::test/foo

I think slamhound should parse this as clojure does (AFAIKT this feature has been in clojure since 1.0, though documentation is scarce) and interprets ::alias/word as a requirement to keep the :as alias.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions