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

Import failed when attributes have the wrong format #282

Open
mueller-tobias opened this issue Oct 18, 2023 · 2 comments
Open

Import failed when attributes have the wrong format #282

mueller-tobias opened this issue Oct 18, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mueller-tobias
Copy link

Hello,

we've the problem that some developers of our plattform create the publiccode.yaml manually. When the publicode.yaml hasn't the correct format, the editor will crash when the developer tries to upload the publicode.yaml for validation.

Steps to reproduce

Create a publiccode.yaml but use a string instead of a list on the description.en.feature attribute.
The Editor will crash and not load anything

# This repository adheres to the publiccode.yml standard by including this
# metadata file that makes public software easily discoverable.
# More info at https://github.com/italia/publiccode.yml

publiccodeYmlVersion: "0.5"
name: Testapp
url: "https://gitlab.opencode.de/test/testapp"
releaseDate: "2023-07-01"
softwareVersion: "1.0"
platforms:
  - linux
categories:
  - data-analytics
  - data-visualization
developmentStatus: stable
softwareType: standalone/other
en:
  countryExtensionVersion: "0.2"
maintenance:
  type: community
  contacts:
    - name: Test
      email: Test@test.com
  contractors:
    - name: Test
      website: "https://www.test.com/"
legal:
  license: EUPL
  mainCopyrightOwner: ITDZ
  repoOwner: ITDZ
localisation:
  localisationReady: false
  availableLanguages:
    - en
description:
  en:
    genericName: DSGVO compliant test app
    shortDescription: DSGVO compliant test app description short
    longDescription: |

      DSGVO compliant test app description long
    features: "Test Feature"

When you can the line

features: "Test Feature"

to

features:
- "Test Feature"

Expected behaviour

Show the yaml file and mark the line/lines that throw the error.
This would give the user a hint where the error in his file is.

Actual behaviour

The Editor crashs and show's nothing.

@mueller-tobias
Copy link
Author

I think the real problem is the publiccode-parser. Should i open there an issue as well?

@bfabio
Copy link
Member

bfabio commented Oct 18, 2023

@mueller-tobias thanks for the issue

I think the real problem is the publiccode-parser. Should i open there an issue as well?

If you managed to crash the parser with some wrong input, please do

@bfabio bfabio added the bug Something isn't working label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants