Skip to content

shebang marked as error: <form> expected, got '/usr/bin/env' #71

Open
@devurandom

Description

@devurandom

Describe the bug

With the following file:

#!/usr/bin/env bb

(require '[babashka.http-client :as http])

Clojure LSP complains about the / after #!: "

expected, got '/usr/bin/env'".

The file is the start of an example copied from the Babashka documentation: https://book.babashka.org/#_running_a_script

The Clojure docs suggest that a shebang is valid syntax (on the first line of a file): https://clojure.org/guides/faq#clj_standalone

{:final-settings {},
 :classpath nil,
 :cljfmt-raw "nil",
 :analysis-summary
 {"internal" {"keyword-usages" 15905.0, "instance-invocations" 65.0, "protocol-impls" 18.0, "local-usages" 7463.0, "namespace-alias" 565.0, "namespace-usages" 621.0, "symbols" 4.0, "var-usages" 18300.0, "namespace-definitions" 26.0, "java-class-usages" 141.0, "locals" 4372.0, "var-definitions" 1131.0}, "external" {"instance-invocations" 417.0, "protocol-impls" 69.0, "local-usages" 8690.0, "namespace-alias" 17.0, "namespace-usages" 22.0, "symbols" 13.0, "var-usages" 12312.0, "namespace-definitions" 2.0, "java-class-usages" 450.0, "locals" 4850.0, "var-definitions" 1259.0}},
 :client-settings nil,
 :project-root-uri nil,
 :port "NREPL only available on :debug profile (`bb debug-cli`)",
 :project-settings nil,
 :server-version "2025.03.07-17.42.36",
 :clj-kondo-version "2025.02.20",
 :log-path "/tmp/clojure-lsp.3767883027226366171.out",
 :classpath-settings nil}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions