Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Martaf/copyrights #320

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Martaf/copyrights #320

wants to merge 4 commits into from

Conversation

martafullen
Copy link
Contributor

Added a neutral copyright to .cs, .ps1 and .razor files.
Added a neutral copyright to .bat files (experimental).

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

}
}

if (!assetIds.IsNullOrEmpty())

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning

Variable
assetIds
may be null at this access because the parameter has a null default value.
Variable
assetIds
may be null at this access because the parameter has a null default value.
Comment on lines +286 to +299
if (aas != null)
{
if (aas.AssetInformation != null)
{
if (aas.AssetInformation.DefaultThumbnail != null && !string.IsNullOrEmpty(aas.AssetInformation.DefaultThumbnail.Path))
{
_packageEnvService.DeleteAssetInformationThumbnail(packageIndex, aas.AssetInformation.DefaultThumbnail);
}
else
{
throw new NotFoundException($"No default thumbnail embedded in the AssetInformation of the requested AAS.");
}
}
}

Check notice

Code scanning / CodeQL

Nested 'if' statements can be combined Note

These 'if' statements can be combined.
Comment on lines +87 to +94
foreach (var submodelReference in aas.Submodels)
{
if (submodelReference.Matches(body))
{
found = true;
break;
}
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Where Note

This foreach loop
implicitly filters its target sequence
- consider filtering the sequence explicitly using '.Where(...)'.
Comment on lines +400 to +404
foreach (var submodelReference in aas.Submodels)
{
if (submodelReference.GetAsExactlyOneKey().Value.Equals(submodelIdentifier))
{ return true; }
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Where Note

This foreach loop
implicitly filters its target sequence
- consider filtering the sequence explicitly using '.Where(...)'.
private readonly IAdminShellPackageEnvironmentService _packageEnvService;
private readonly IMetamodelVerificationService _verificationService;
private readonly ISubmodelService _submodelService;
private AdminShellPackageEnv[] _packages;

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity Note

Field '_packages' can be 'readonly'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants