Skip to content

Commit 4b58579

Browse files
Updated reviewed comments
1 parent e340c27 commit 4b58579

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

doc/UsageDoc/CA_UsageDocument.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Currently LTA support is not provided for SBOM, hence until that is implemented
164164
- Processes the input file and generates CycloneDX BOM file. The input file can be package file or a cycloneDx BOM file generated using the standard tool. If there are multiple input files, it can be processed by just passing the path to the directory in the argument
165165

166166
**Functionality Without Connections:**
167-
Ensure that when connections to SW360 and JFrog are not available, the tool generates a basic SBOM accurately, maintaining the core functionalities.
167+
Provide users the flexibility to generate a basic SBOM even when connections to SW360, JFrog, or both are unavailable. The tool should support limited capabilities in such scenarios, ensuring essential SBOM generation functionality is maintained.
168168

169169
>**2. SW360 Package Creator**
170170
- Process the SBOM file(i.e., output of the first dll) and creates the missing components/releases in SW360 and links all the components to the project in the SW360 portal. This exe also triggers the upload of the components to Fossology and automatically updates the clearing state in SW360.

src/LCT.Common/CommonAppSettings.cs

+3-7
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public string ProjectType
6161
m_ProjectType = value;
6262
}
6363
}
64-
public bool MultipleProjectType { get; set; } = false;
64+
public bool MultipleProjectType { get; set; } = false;
6565
public Telemetry Telemetry { get; set; }
6666
public SW360 SW360 { get; set; }
6767
public Directory Directory { get; set; }
@@ -115,14 +115,10 @@ public string URL
115115
}
116116
set
117117
{
118-
if (string.IsNullOrEmpty(value))
119-
{
120-
121-
}
122-
else
118+
if (!string.IsNullOrEmpty(value))
123119
{
124120
m_URL = value.TrimEnd(Dataconstant.ForwardSlash);
125-
}
121+
}
126122
}
127123
}
128124
public string ProjectName

src/LCT.Common/CommonHelper.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ public static string AddSpecificValuesToBOMFormat(Bom listOfComponentsToBom)
254254
return formattedString;
255255
}
256256

257-
258257
public static string[] GetRepoList(CommonAppSettings appSettings)
259258
{
260259
var projectTypeMappings = new Dictionary<string, Func<Artifactory>>
@@ -281,7 +280,7 @@ public static string[] GetRepoList(CommonAppSettings appSettings)
281280
}
282281

283282
return Array.Empty<string>();
284-
}
283+
}
285284
#endregion
286285

287286
#region private

src/LCT.PackageIdentifier/BomCreator.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,19 @@ private async Task<Bom> ComponentIdentification(CommonAppSettings appSettings, I
198198
components = await parser.GetJfrogRepoDetailsOfAComponent(components, appSettings, JFrogService, BomHelper);
199199
bom.Components = components;
200200
}
201-
bom.Metadata = metadata;
202-
if (appSettings.Jfrog==null)
201+
else
203202
{
204203
Property projectType = new() { Name = Dataconstant.Cdx_ProjectType, Value = appSettings.ProjectType };
205204
foreach (var component in bom.Components)
206-
{
205+
{
207206
bool propertyExists = component.Properties.Any(p => p.Name == Dataconstant.Cdx_ProjectType);
208207
if (!propertyExists)
209208
{
210209
component.Properties.Add(projectType);
211210
}
212211
}
213212
}
213+
bom.Metadata = metadata;
214214
}
215215
catch (HttpRequestException ex)
216216
{

0 commit comments

Comments
 (0)