Lines Matching +full:- +full:f

3 # SPDX-License-Identifier: Apache-2.0
21 # when assembling a Package's data, should we auto-conclude the
25 # when assembling a Package's Files' data, should we auto-conclude
29 # number of lines to scan for SPDX-License-Identifier (0 = all)
43 p = line.partition("SPDX-License-Identifier:")
55 Scans the specified file for the first SPDX-License-Identifier:
59 - filePath: path to file to scan.
60 - numLines: number of lines to scan for an expression before
64 log.dbg(f" - getting licenses for {filePath}")
66 with open(filePath, "r") as f:
69 for line in f:
77 # invalid UTF-8 content
89 - expression: SPDX license expression
109 - pkg: Package
113 for f in pkg.files.values():
114 hashes.append(f.sha1)
119 hSHA1.update(filelist.encode('utf-8'))
129 - lic: detected license ID
130 - doc: Document
141 - pkg: Package
147 for f in pkg.files.values():
148 licsConcluded.add(f.concludedLicense)
149 for licInfo in f.licenseInfoInFile:
160 - licsConcluded: array of license expressions
176 revised.append(f"({lic})")
188 - cfg: ScannerConfig
189 - doc: Document
192 log.inf(f"scanning files in package {pkg.cfg.name} in document {doc.cfg.name}")
195 for f in pkg.files.values():
197 f.relpath = os.path.relpath(f.abspath, pkg.cfg.relativeBaseDir)
200 hashes = getHashes(f.abspath)
202 log.wrn(f"unable to get hashes for file {f.abspath}; skipping")
205 f.sha1 = hSHA1
207 f.sha256 = hSHA256
209 f.md5 = hMD5
212 expression = getExpressionData(f.abspath, cfg.numLinesScanned)
215 f.concludedLicense = expression
216 f.licenseInfoInFile = splitExpression(expression)
219 for lic in f.licenseInfoInFile: