clojure

package
v0.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package clojure implements a gorisk analyzer for Clojure projects. It supports deps.edn (tools.deps) and project.clj (Leiningen).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildIRGraph

func BuildIRGraph(g *graph.DependencyGraph) ir.IRGraph

BuildIRGraph builds a function-level IR graph for a Clojure dependency graph.

func Detect

func Detect(dir string) capability.CapabilitySet

Detect walks .clj, .cljs, and .cljc files in dir and returns the combined capability set found in those source files.

func DetectFunctions

func DetectFunctions(dir, pkgName string, files []string) (map[string]ir.FunctionCaps, []ir.CallEdge, error)

DetectFunctions parses Clojure .clj/.cljs/.cljc files and returns per-function capability sets and call edges.

Types

type Adapter

type Adapter struct{}

Adapter implements the analyzer.Adapter interface for Clojure projects.

func (Adapter) Load

func (Adapter) Load(dir string) (*graph.DependencyGraph, error)

Load parses the Clojure dependency file in dir, detects capabilities from Clojure source files, and returns a *graph.DependencyGraph.

func (Adapter) Name

func (Adapter) Name() string

Name returns the language identifier.

type ClojurePackage

type ClojurePackage struct {
	Name         string
	Version      string
	Direct       bool
	Dependencies []string
}

ClojurePackage represents a Clojure/Maven dependency extracted from a lockfile.

func Load

func Load(dir string) (pkgs []ClojurePackage, retErr error)

Load detects and parses the Clojure dependency file in dir. Priority: deps.edn → project.clj. Load never panics; it returns a structured error on failure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL