Essai fix Sonar
continuous-integration/drone/push Build is failing Details

pull/19/head
Liam MONCHANIN 2 years ago
parent f2358887da
commit 7bcef40dbf

@ -29,11 +29,12 @@ steps:
- name: sonar
image: hub.codefirst.iut.uca.fr/marc.chevaldonne/codefirst-dronesonarplugin-dotnet7
secrets: [ Sonar_Login ]
settings:
sonar_host: https://codefirst.iut.uca.fr/sonar/
sonar_token:
from_secret: Sonar_Login
project_key: notus_ThMo
environment:
settings:
sonar_host: https://codefirst.iut.uca.fr/sonar/
sonar_token:
from_secret: Sonar_Login
project_key: notus_ThMo
commands:
- cd notus/
- dotnet restore notus_without_maui.sln

@ -26,7 +26,7 @@ namespace Biblioteque_de_Class
private DateOnly CreationDate { get; }
private DateOnly ModificationDate { get; set; }
private List<NoteImage> ImageList;
private List<string> TextLineList;
private string TextLine;
private List<User> Collaborators;
private List<User> Editors;
private User Owner;
@ -38,7 +38,6 @@ namespace Biblioteque_de_Class
CreationDate = DateOnly.FromDateTime(DateTime.Now);
ModificationDate = DateOnly.FromDateTime(DateTime.Now);
ImageList = new List<NoteImage>();
TextLineList = new List<string>();
Collaborators = new List<User>();
Editors = new List<User>();
Owner = owner;
@ -49,16 +48,17 @@ namespace Biblioteque_de_Class
public DateOnly GetCreationDate() { return CreationDate; }
public DateOnly GetModificationDate() { return ModificationDate; }
public List<NoteImage> GetImageList() { return ImageList; }
public List<string> GetTextLineList() { return TextLineList; }
public string GetTextLine() { return TextLine; }
public List<User> GetCollaborators() { return Collaborators; }
public List<User> GetEditors() { return Editors; }
public User GetOwner() { return Owner; }
public override string ToString() => $"Note -> Name: {Name}\nLogoPath: {LogoPath}\nNumber of lines: {TextLineList.Count()}";
public override string ToString() => $"Note -> Name: {Name}\nLogoPath: {LogoPath}";
public void SetName(string name) { Name = name; }
public void SetLogoPath(string logoPath) { LogoPath = logoPath; }
public void SetModificationDate() { ModificationDate = DateOnly.FromDateTime(DateTime.Now); }
public void SetTextLine(string texte) { TextLine = texte; }
/// <summary>
/// vérifier si l'utilisateur est le propriétaire de la note

@ -1,6 +1,7 @@
using Biblioteque_de_Class;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics;
using System.Linq.Expressions;
string Upseudo = "u";
string Umail = "u";
@ -16,7 +17,7 @@ string choixNom;
string choixCouleur;
string choixModif;
string _image = "u";
string choix = "u";
string choix;
string newColor = "u";
string color = "u";
string color2;
@ -140,6 +141,8 @@ while (boucle == 0)
break;
case "6":///Supprimer une note
Console.WriteLine("Cherchez une note");
nom = Console.ReadLine();
u.SearchNoteByName(nom);
u.DeleteNote(n);
break;
@ -201,7 +204,7 @@ while (boucle == 0)
case "15":///Supprimer une note des favoris
Console.WriteLine("Chercher note");
nom = Console.ReadLine();
u.SearchNoteByName(nom);
u.SearchFavoriteNoteByName(nom);
u.RemoveFavorite(n);
break;
@ -217,6 +220,9 @@ while (boucle == 0)
listCouleurs.Add(color3);
Theme th = new Theme(nom, listCouleurs);
db.AddTheme(th);
listCouleurs.RemoveAt(1);
listCouleurs.RemoveAt(1);
listCouleurs.RemoveAt(1);
break;
case "17":///Supprimer un theme
@ -238,6 +244,9 @@ while (boucle == 0)
NewColorList.Add(color2);
NewColorList.Add(color3);
db.ModifyThemeColorList(th, NewColorList);
NewColorList.RemoveAt(1);
NewColorList.RemoveAt(1);
NewColorList.RemoveAt(1);
break;
case "19":///Rechercher une note
@ -287,11 +296,12 @@ while (boucle == 0)
}
break;
case "24":///Modifier le texte de la note mais jsp c'est quoi qu'il faut set
case "24":///Modifier le texte de la note
n.VerifyPrivilege(u);
if (true)
{
//n.SetTextLineList();
string texte = Console.ReadLine();
n.SetTextLine(texte);
}
else
{
@ -303,6 +313,9 @@ while (boucle == 0)
n.VerifyPrivilege(u);
if (true)
{
Console.WriteLine("Saisissez un utilisateur");
nom = Console.ReadLine();
user = db.GetUser(nom);
n.AddCollaborator(u, user);
}
break;
@ -313,11 +326,15 @@ while (boucle == 0)
n.VerifyPrivilege(u);
if (true && choix.Equals('0'))
{
Console.WriteLine("Saisissez un utilisateur");
nom = Console.ReadLine();
user = db.GetUser(nom);
n.AddEditor(u, user);
}
if (true && choix.Equals('1'))
{
Console.WriteLine("Saisissez un utilisateur");
nom = Console.ReadLine();
user = db.GetUser(nom);
n.RemoveEditor(u, user);
}
@ -327,6 +344,8 @@ while (boucle == 0)
n.VerifyPrivilege(u);
if (true)
{
Console.WriteLine("Saisissez un utilisateur");
nom = Console.ReadLine();
user = db.GetUser(nom);
n.RemoveCollaborator(u, user);
}

Loading…
Cancel
Save