umbraco/Umbraco-CMS

Multiple warnings in source code

Fermée

#15 015 ouverte le 21 oct. 2023

 (15 commentaires) (4 réactions) (1 personne assignée)C# (2 593 forks)batch import
area/backendcommunity/up-for-grabsgood first issuetype/bug

Métriques du dépôt

Stars
 (4 067 étoiles)
Métriques de merge PR
 (Merge moyen 10j 7h) (132 PRs mergées en 30 j)

Description

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

12.3.0+ (but applies to any version) v16 (latest)

Bug summary

There are thousands of warnings within the Umbraco source code. I was hoping to try and start to reduce these as use this issue as a base to work from (unless there already is one?).

My idea is to go through each project and check that there are no warnings, and if there are, remove them.

This is until perhaps we can set warnings as errors to keep it clean for future? Bigger step/decision! I have started an initial PR for this at #15019.

Specifics

I recommend ticking off each project if there are no warnings, or if all warnings have since been removed. To maintain this, we would also set warnings as errors (something for HQ to consider)

Steps to reproduce

  1. Open IDE of choice
  2. Build
  3. Observe warnings

Expected result / actual result

Minimal to no warnings ultimately

### Tasks
- [x] Remove warnings from Templates/Umbraco.Templates project
- [ ] Remove warnings from Tests/Umbraco.TestData project
- [x] Remove warnings from Tests/Umbraco.Tests.AcceptanceTest.UmbracoProject project
- [x] Remove warnings from Tests/Umbraco.Tests.AcceptanceTest project
- [ ] Remove warnings from Tests/Umbraco.Tests.Benchmarks project
- [x] Remove warnings from Tests/Umbraco.Tests.Common project
- [ ] Remove warnings from Tests/Umbraco.Tests.Integration project
- [ ] Remove warnings from Tests/Umbraco.Tests.UnitTests project
- [x] Remove warnings from Tools/Umbraco.JsonSchema project
- [x] Remove warnings from Umbraco.Cms project
- [ ] Remove warnings from Umbraco.Cms.Api.Common project
- [ ] Remove warnings from Umbraco.Cms.Api.Delivery project
- [ ] Remove warnings from Umbraco.Cms.Api.Management project
- [x] Remove warnings from Umbraco.Cms.Imaging.ImageSharp project
- [x] Remove warnings from Umbraco.Cms.Imaging.ImageSharp2 project
- [ ] Remove warnings from Umbraco.Cms.Persistence.EFCore project
- [x] Remove warnings from Umbraco.Cms.Persistence.EFCore.SqlServer project
- [x] Remove warnings from Umbraco.Cms.Persistence.EFCore.Sqlite project
- [ ] Remove warnings from Umbraco.Cms.Persistence.SqlServer project
- [ ] Remove warnings from Umbraco.Cms.Persistence.Sqlite project
- [x] Remove warnings from Umbraco.Cms.StaticAssets project
- [ ] Remove warnings from Umbraco.Cms.Targets project
- [ ] Remove warnings from Umbraco.Core project
- [ ] Remove warnings from Umbraco.Examine.Lucene project
- [ ] Remove warnings from Umbraco.Infrastructure project
- [ ] Remove warnings from Umbraco.PublishedCache.HybridCache project
- [ ] Remove warnings from Umbraco.Web.Common project
- [ ] Remove warnings from Umbraco.Web.UI project
- [x] Remove warnings from Umbraco.Web.UI.Client project
- [x] Remove warnings from Umbraco.Web.UI.Login project
- [ ] Remove warnings from Umbraco.Web.Website project

Guide contributeur