Skip to content

Kibit blows up on qualified keywords when require has a :refer #238

@sapple-code

Description

@sapple-code

Overview

Running kibit blows up on qualified keywords when the :refer statement comes before the :as statement in the require.

$ lein kibit
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Retrieving lein-kibit/lein-kibit/0.1.8/lein-kibit-0.1.8.pom from clojars
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.pom from central
Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.pom from central
Retrieving org/clojure/clojure/1.6.0/clojure-1.6.0.pom from central
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.pom from central
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.jar from central
Retrieving lein-kibit/lein-kibit/0.1.8/lein-kibit-0.1.8.jar from clojars
Retrieving org/clojure/clojure/1.8.0/clojure-1.8.0.jar from central
Check failed -- skipping rest of file (src/repro/core.clj:4:null)
[line 4, col 10] Invalid keyword: ::s/derp.

Steps to reproduce:

  1. Create a clj project:
lein new repro
  1. Add kibit to leiningen plugins
(defproject repro "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.10.1"]]
  :plugins [[lein-kibit "0.1.8"]]
  :repl-options {:init-ns repro.core})
  1. Update src/repro/core.clj to be:
(ns repro.core
  (:require [clojure.string :refer [join] :as s]))

(::s/derp {})
  1. run kibit
lein kibit

Context

Clojure: 1.10.1
kibit version: 0.1.8

Note: didn't happen in kibit version: 0.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions