xref: /aosp_15_r20/external/spdx-tools/docs/idsearcher-assumptions.md (revision ba677afa8f67bb56cbc794f4d0e378e0da058e16)
1*ba677afaSXin LiSPDX-License-Identifier: CC-BY-4.0
2*ba677afaSXin Li
3*ba677afaSXin LiThe short-form ID searcher in `package idsearcher` makes the following assumptions:
4*ba677afaSXin Li
5*ba677afaSXin Li- The searcher uses bufio.Scanner to scan the contents of each file, line by
6*ba677afaSXin Li  line. If it encounters a line that is too large to fit within the buffer, it
7*ba677afaSXin Li  will stop scanning that file. As a result, it will currently only pick up
8*ba677afaSXin Li  short-form IDs that occur prior to such a line.
9*ba677afaSXin Li
10*ba677afaSXin Li- For PackageLicenseInfoFromFiles (in Package) and LicenseInfoInFile (in File),
11*ba677afaSXin Li  an exception should be treated as a separate "license". For example, in the
12*ba677afaSXin Li  expression `GPL-2.0-only WITH Classpath-exception-2.0`, each of `GPL-2.0-only`
13*ba677afaSXin Li  and `Classpath-exception-2.0` will be listed separately.
14