Handle checks and results as a structured array instead of an array of strings.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Poiché non sono indicati file o test, inizia tracciando il flusso attuale dei controlli e dei risultati del plugin. Esamina gli esempi di console e JSON in PR #458, quindi verifica che i controlli mantengano dati strutturati di tipo/messaggio e che ogni formato di output possa visualizzarli senza analizzare HTML.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What?
Currently, the errors produced by the check class are a list of strings containing HTML tags. This makes using these messages difficult for something that's not printing the results to an HTML page.
Exampe:
"<span class="tc-lead tc-warning">WARNING</span>: <strong>screenshot.png</strong> is 704.2 KB in size. Large file sizes have a negative impact on website performance and loading time. Compress images before using them."
If we the plugin can handle the messages as a list of objects (PHP relational arrays) and format just before outputting them, it would be easier to handle that in different formats (Html page, console output, JSON).
Example of 2 different outputs being implemented (console and json in the console): https://github.com/WordPress/theme-check/pull/458
Expected
The plugin could handle the errors like this. In this way, each output handler could format it accordingly without parsing or removing HTML.
$checks = array (
array(
'type' => 'ERROR',
'message' => 'This is an error text'
),
array(
'type' => 'WARNING',
'message' => 'This is an warning error text'
),
array(
'type' => 'INFO',
'message' => 'This is an info text'
),
)
- Lingua principale
- PHP
- Stelle
- 372
- Fork
- 114
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WordPress/theme-check
-
Blocklisted file-extension patterns are unanchored, so ordinary filenames fail the checkForse già presa @CookieDarb l’ha presa 35 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
WordPress/theme-check#504 ·
-
Bug: "License" and "License URI" are missing from Theme Info summary when checking the active themeForse già presa @CookieDarb l’ha presa 130 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
WordPress/theme-check#494 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
WordPress/theme-check#492 · 2 commenti ·
-
Theme Check flags "wordpress" identifier as REQUIRED — false positive, do not "fix" by renamingForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 45/100
WordPress/theme-check#505 · 1 reazione ·
-
Typescript TestsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
WordPress/theme-check#491 ·
Tutte le issue di WordPress/theme-check
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
backdrop-contrib/commerce#65 ·
-
backend enhancement good first issue php
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Evalogical-Inc/devReady#66 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mollie/PrestaShop#1627 ·
I maintainer di solito rispondono entro 5 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
FriendsOfFlarum/follow-tags#118 ·