beicause / call-graph

Generate call graph for vscode in svg or graphviz dot.
Apache License 2.0
73 stars 17 forks source link

Ignore file not mentioned in the readme #14

Closed jotavemonte closed 8 months ago

jotavemonte commented 1 year ago

The .callgraphignore was added at #6 , but there's no mention of it or of how to use it in the readme file.

yaomengsi commented 1 year ago

According to the source code, it is necessary to add file configuration in the workspace configuration file ${workspace}/.callgraphignore.

import * as pm from 'picomatch'
        const graph = await callNodeFunction(entry[0], item => {
            if (ignoreFile === null) return false
            const patterns = fs
                .readFileSync(ignoreFile)
                .toString()
                .split('\n')
                .filter(str => str.length > 0)
                .map(str => path.resolve(workspace.fsPath, str))
            return pm(patterns)(item.uri.fsPath)
        })

pm reference

so, .callgraphignore would like

**ignore/path**
zdx3578 commented 10 months ago

.map(str => path.resolve(workspace.fsPath, str))

so just ignore in workspace ?

beicause commented 8 months ago

see #16