MCPcopy Create free account
hub / github.com/breck7/scroll / formatCommand

Method formatCommand

scroll.js:131–139  ·  view source on GitHub ↗
(cwd, filenames)

Source from the content-addressed store, hash-verified

129 }
130
131 async formatCommand(cwd, filenames) {
132 let files = []
133 if (filenames && filenames.length) files = await this.getFiles(cwd, filenames)
134 else files = await this.sfs.getFusedFilesInFolder(this.resolvePath(cwd), ".scroll")
135 // .concat(fileSystem.getFusedFilesInFolder(folder, ".parsers")) // todo: should format parser files too.
136 for (let file of files) {
137 this.formatFile(file.scrollProgram)
138 }
139 }
140
141 // Formatting is currently defined as formatting the entire original source file
142 // using the last parser present.

Callers

nothing calls this directly

Calls 4

getFilesMethod · 0.95
formatFileMethod · 0.95
getFusedFilesInFolderMethod · 0.80
resolvePathMethod · 0.45

Tested by

no test coverage detected