Page MenuHomeWildfire Games

List multiselection
Needs ReviewPublic

Authored by Angen on Feb 28 2018, 9:58 PM.

Details

Reviewers
vladislavbelov
wraitii
elexis
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#4683
Summary

Implemented C++:

multi selection with SHIFT
adding and removing from selection using CTRL

Implemented JS:

load game
save game
replay menu

Test Plan

Apply patch,
open load, save and replay menu.
Check multi selecting with shift and single adding/removing to/from selection holding ctrl

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Angen updated this revision to Diff 6168.Mar 14 2018, 9:22 PM
Angen edited the test plan for this revision. (Show Details)

Shift selection update
Not getting shift, ctrl release solved

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  51|  51| 		toDeleteNames.push(gameSelection.list[selected]);
|  52|  52| 	}
|  53|  53| 	else
|  54|    |-	{
|    |  54|+	
|  55|  55| 		for (let i = 0; i < gameSelection.multiSelected.length; ++i)
|  56|  56| 		{
|  57|  57| 			selected = gameSelection.multiSelected[i];
|  58|  58| 			toDelete.push(gameSelection.list_data[selected]);
|  59|  59| 			toDeleteNames.push(gameSelection.list[selected]);
|  60|  60| 		}
|  61|    |-	}
|    |  61|+	
|  62|  62| 
|  63|  63| 	if (Engine.HotkeyIsPressed("session.savedgames.noconfirmation"))
|  64|  64| 		reallyDeleteGame(toDelete);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  68|  68| 			sprintf(translate("\"%(label)s\""), {
|  69|  69| 				"label": toDeleteNames.join("\n")
|  70|  70| 			}) + "\n" + translatePlural(
|  71|    |-			"Saved game will be permanently deleted, are you sure?",
|    |  71|+				"Saved game will be permanently deleted, are you sure?",
|  72|  72| 			"Saved games will be permanently deleted, are you sure?",
|  73|  73| 			toDeleteNames.length
|  74|  74| 			),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  69|  69| 				"label": toDeleteNames.join("\n")
|  70|  70| 			}) + "\n" + translatePlural(
|  71|  71| 			"Saved game will be permanently deleted, are you sure?",
|  72|    |-			"Saved games will be permanently deleted, are you sure?",
|    |  72|+				"Saved games will be permanently deleted, are you sure?",
|  73|  73| 			toDeleteNames.length
|  74|  74| 			),
|  75|  75| 			translate("DELETE"),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  70|  70| 			}) + "\n" + translatePlural(
|  71|  71| 			"Saved game will be permanently deleted, are you sure?",
|  72|  72| 			"Saved games will be permanently deleted, are you sure?",
|  73|    |-			toDeleteNames.length
|    |  73|+				toDeleteNames.length
|  74|  74| 			),
|  75|  75| 			translate("DELETE"),
|  76|  76| 			[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  81|  81| function reallyDeleteGame(gameIDs)
|  82|  82| {
|  83|  83| 	for (let gameID of gameIDs)
|  84|    |-	{
|    |  84|+	
|  85|  85| 		if (!Engine.DeleteSavedGame(gameID))
|  86|  86| 			error("Could not delete saved game: " + gameID);
|  87|    |-	}
|    |  87|+	
|  88|  88| 	// Run init again to refresh saved game list
|  89|  89| 	init();
|  90|  90| }
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 169| 169| 		directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 170| 170| 	}
| 171| 171| 	else
| 172|    |-	{
|    | 172|+	
| 173| 173| 		for (let i = 0; i < replaySelection.multiSelected.length; ++i)
| 174| 174| 		{
| 175| 175| 			selected = replaySelection.multiSelected[i];
| 176| 176| 			directories.push(g_ReplaysFiltered[selected].directory);
| 177| 177| 			directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 178| 178| 		}
| 179|    |-	}
|    | 179|+	
| 180| 180| 	messageBox(
| 181| 181| 		500, 200,
| 182| 182| 		translatePlural("Are you sure you want to delete this replay permanently?",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 180| 180| 	messageBox(
| 181| 181| 		500, 200,
| 182| 182| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 183|    |-		"Are you sure you want to delete these replays permanently?",
|    | 183|+			"Are you sure you want to delete these replays permanently?",
| 184| 184| 		directories.length
| 185| 185| 		) + "\n" +
| 186| 186| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 181| 181| 		500, 200,
| 182| 182| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 183| 183| 		"Are you sure you want to delete these replays permanently?",
| 184|    |-		directories.length
|    | 184|+			directories.length
| 185| 185| 		) + "\n" +
| 186| 186| 			escapeText(directoryNames.join("\n")),
| 187| 187| 		translatePlural("Delete replay", "Delete replays", directories.length),
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 201| 201| 		return;
| 202| 202| 	let directories = [];
| 203| 203| 	if (!replaySelection.multiSelected.length)
| 204|    |-	{
|    | 204|+	
| 205| 205| 		directories.push(g_ReplaysFiltered[selected].directory);
| 206|    |-	}
|    | 206|+	
| 207| 207| 	else
| 208| 208| 	{
| 209| 209| 		for (let i = 0; i < replaySelection.multiSelected.length; ++i)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 205| 205| 		directories.push(g_ReplaysFiltered[selected].directory);
| 206| 206| 	}
| 207| 207| 	else
| 208|    |-	{
|    | 208|+	
| 209| 209| 		for (let i = 0; i < replaySelection.multiSelected.length; ++i)
| 210| 210| 		{
| 211| 211| 			selected = replaySelection.multiSelected[i];
| 212| 212| 			directories.push(g_ReplaysFiltered[selected].directory);
| 213| 213| 		}
| 214|    |-	}
|    | 214|+	
| 215| 215| 	reallyDeleteReplay(directories);
| 216| 216| }
| 217| 217| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 226| 226| 	var selectedIndex = replaySelection.selected;
| 227| 227| 
| 228| 228| 	for (let replayDirectory of replayDirectories)
| 229|    |-	{
|    | 229|+	
| 230| 230| 		if (!Engine.DeleteReplay(replayDirectory))
| 231| 231| 			error("Could not delete replay!");
| 232|    |-	}
|    | 232|+	
| 233| 233| 
| 234| 234| 	// Refresh replay list
| 235| 235| 	init();

binaries/data/mods/public/gui/loadgame/load.js
|  34| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

Link to build: https://jenkins.wildfiregames.com/job/differential/245/display/redirect

Stan added a subscriber: Stan.Mar 15 2018, 7:54 PM
Stan added inline comments.
binaries/data/mods/public/gui/common/functions_utility_loadsave.js
55 ↗(On Diff #6168)

For ( let x off) since you do not seem to delete anything.

binaries/data/mods/public/gui/replaymenu/replay_actions.js
158

Let

170

For of

187

Let

binaries/data/mods/public/gui/replaymenu/replay_menu.js
271–272

Single replay selected maybe ?

source/gui/CGUIList.h
18 ↗(On Diff #6168)

Readd newline

source/gui/CGUISeries.h
18 ↗(On Diff #6168)

Same here

source/gui/CList.cpp
145

Range loop maybe. Else ++it if you can't find a better name.

source/gui/CList.h
86

Doxygen ?

source/gui/COList.cpp
312

Range loop selecteditem for the name felse invert iterator

Angen updated this revision to Diff 6592.May 20 2018, 9:42 AM

small update

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  51|  51| 		toDeleteNames.push(gameSelection.list[selected]);
|  52|  52| 	}
|  53|  53| 	else
|  54|    |-	{
|    |  54|+	
|  55|  55| 		for (let selected of gameSelection.multiSelected)
|  56|  56| 		{
|  57|  57| 			toDelete.push(gameSelection.list_data[selected]);
|  58|  58| 			toDeleteNames.push(gameSelection.list[selected]);
|  59|  59| 		}
|  60|    |-	}
|    |  60|+	
|  61|  61| 
|  62|  62| 	if (Engine.HotkeyIsPressed("session.savedgames.noconfirmation"))
|  63|  63| 		reallyDeleteGame(toDelete);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  67|  67| 			sprintf(translate("\"%(label)s\""), {
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|    |-			"Saved game will be permanently deleted, are you sure?",
|    |  70|+				"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|    |-			"Saved games will be permanently deleted, are you sure?",
|    |  71|+				"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|    |-			toDeleteNames.length
|    |  72|+				toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|  75|  75| 			[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  80|  80| function reallyDeleteGame(gameIDs)
|  81|  81| {
|  82|  82| 	for (let gameID of gameIDs)
|  83|    |-	{
|    |  83|+	
|  84|  84| 		if (!Engine.DeleteSavedGame(gameID))
|  85|  85| 			error("Could not delete saved game: " + gameID);
|  86|    |-	}
|    |  86|+	
|  87|  87| 	// Run init again to refresh saved game list
|  88|  88| 	init();
|  89|  89| }

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.

binaries/data/mods/public/gui/loadgame/load.js
|  34| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 167| 167| 		directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 168| 168| 	}
| 169| 169| 	else
| 170|    |-	{
|    | 170|+	
| 171| 171| 		for (selected of replaySelection.multiSelected)
| 172| 172| 		{
| 173| 173| 			directories.push(g_ReplaysFiltered[selected].directory);
| 174| 174| 			directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 175| 175| 		}
| 176|    |-	}
|    | 176|+	
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180|    |-		"Are you sure you want to delete these replays permanently?",
|    | 180|+			"Are you sure you want to delete these replays permanently?",
| 181| 181| 		directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180| 180| 		"Are you sure you want to delete these replays permanently?",
| 181|    |-		directories.length
|    | 181|+			directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
| 184| 184| 		translatePlural("Delete replay", "Delete replays", directories.length),
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 200| 200| 	if (!replaySelection.multiSelected.length)
| 201| 201| 		directories.push(g_ReplaysFiltered[selected].directory);
| 202| 202| 	else
| 203|    |-	{
|    | 203|+	
| 204| 204| 		for (selected of replaySelection.multiSelected)
| 205| 205| 			directories.push(g_ReplaysFiltered[selected].directory);
| 206|    |-	}
|    | 206|+	
| 207| 207| 	reallyDeleteReplay(directories);
| 208| 208| }
| 209| 209| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 218| 218| 	var selectedIndex = replaySelection.selected;
| 219| 219| 
| 220| 220| 	for (let replayDirectory of replayDirectories)
| 221|    |-	{
|    | 221|+	
| 222| 222| 		if (!Engine.DeleteReplay(replayDirectory))
| 223| 223| 			error("Could not delete replay!");
| 224|    |-	}
|    | 224|+	
| 225| 225| 
| 226| 226| 	// Refresh replay list
| 227| 227| 	init();

Link to build: https://jenkins.wildfiregames.com/job/differential/526/display/redirect

Angen updated this revision to Diff 7534.Mar 10 2019, 12:38 PM

rebase
@vladislavbelov chance to look into this? I would like to finish it :)

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/gui/GUItypes.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/gui/CGUISeries.h
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"

source/gui/GUI.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/gui/CList.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/gui/CGUIList.h
|   1| /*·Copyright·(C)·2009·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2009"

source/gui/GUIutil.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/gui/CList.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 167| 167| 		directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 168| 168| 	}
| 169| 169| 	else
| 170|    |-	{
|    | 170|+	
| 171| 171| 		for (selected of replaySelection.multiSelected)
| 172| 172| 		{
| 173| 173| 			directories.push(g_ReplaysFiltered[selected].directory);
| 174| 174| 			directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 175| 175| 		}
| 176|    |-	}
|    | 176|+	
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180|    |-		"Are you sure you want to delete these replays permanently?",
|    | 180|+			"Are you sure you want to delete these replays permanently?",
| 181| 181| 		directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180| 180| 		"Are you sure you want to delete these replays permanently?",
| 181|    |-		directories.length
|    | 181|+			directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
| 184| 184| 		translatePlural("Delete replay", "Delete replays", directories.length),
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 200| 200| 	if (!replaySelection.multiSelected.length)
| 201| 201| 		directories.push(g_ReplaysFiltered[selected].directory);
| 202| 202| 	else
| 203|    |-	{
|    | 203|+	
| 204| 204| 		for (selected of replaySelection.multiSelected)
| 205| 205| 			directories.push(g_ReplaysFiltered[selected].directory);
| 206|    |-	}
|    | 206|+	
| 207| 207| 	reallyDeleteReplay(directories);
| 208| 208| }
| 209| 209| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 218| 218| 	var selectedIndex = replaySelection.selected;
| 219| 219| 
| 220| 220| 	for (let replayDirectory of replayDirectories)
| 221|    |-	{
|    | 221|+	
| 222| 222| 		if (!Engine.DeleteReplay(replayDirectory))
| 223| 223| 			error("Could not delete replay!");
| 224|    |-	}
|    | 224|+	
| 225| 225| 
| 226| 226| 	// Refresh replay list
| 227| 227| 	init();

binaries/data/mods/public/gui/loadgame/load.js
|  34| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  51|  51| 		toDeleteNames.push(gameSelection.list[selected]);
|  52|  52| 	}
|  53|  53| 	else
|  54|    |-	{
|    |  54|+	
|  55|  55| 		for (let selected of gameSelection.multiSelected)
|  56|  56| 		{
|  57|  57| 			toDelete.push(gameSelection.list_data[selected]);
|  58|  58| 			toDeleteNames.push(gameSelection.list[selected]);
|  59|  59| 		}
|  60|    |-	}
|    |  60|+	
|  61|  61| 
|  62|  62| 	if (Engine.HotkeyIsPressed("session.savedgames.noconfirmation"))
|  63|  63| 		reallyDeleteGame(toDelete);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  67|  67| 			sprintf(translate("\"%(label)s\""), {
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|    |-			"Saved game will be permanently deleted, are you sure?",
|    |  70|+				"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|    |-			"Saved games will be permanently deleted, are you sure?",
|    |  71|+				"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|    |-			toDeleteNames.length
|    |  72|+				toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|  75|  75| 			[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  80|  80| function reallyDeleteGame(gameIDs)
|  81|  81| {
|  82|  82| 	for (let gameID of gameIDs)
|  83|    |-	{
|    |  83|+	
|  84|  84| 		if (!Engine.DeleteSavedGame(gameID))
|  85|  85| 			error("Could not delete saved game: " + gameID);
|  86|    |-	}
|    |  86|+	
|  87|  87| 	// Run init again to refresh saved game list
|  88|  88| 	init();
|  89|  89| }

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1087/display/redirect

wraitii added reviewers: Restricted Owners Package, wraitii.Apr 22 2019, 9:37 AM
wraitii added a subscriber: wraitii.

Might also take a look at this.

wraitii requested changes to this revision.Apr 22 2019, 1:32 PM

I would suggest that C++ GUI lists are always "multi select", but we can enable/disable the actual multi-selection part. So change 'selected' to be a CIntList, which would return a one-sized array. Then JS code wouldn't have to awkwardly handle two cases.
That would imply modifying a lot of existing JS GUI code though. But it sounds greppable. So I'd say give it a shot, if it's too difficult I'll change my mind.

I'm also wondering whether we really need CIntList, but I guess it makes code more convenient. I would rename CList to CStringList then though, as that makes it obvious that both are specialised.

This revision now requires changes to proceed.Apr 22 2019, 1:32 PM
Angen updated this revision to Diff 7992.May 13 2019, 5:05 PM

Expand behaviour to control with keys (nextItem, previtem, firstItem, lastItem)

I like the idea with always using array, I ll try something later (just thinking about that it can make next/prev item selection not nice, but maybe rather that like what is now in js)

CIntList is wrapper around int vector something similar to CGUIList, maybe better name should be found that CIntList (it is needed to wrap int vector in class, else does not compile)

Angen planned changes to this revision.May 13 2019, 5:08 PM

Comments capitalisation and years.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/gui/CGUISeries.h
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"

source/gui/GUI.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/gui/CList.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/gui/CGUIList.h
|   1| /*·Copyright·(C)·2009·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2009"

source/gui/GUItypes.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/gui/GUIutil.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
Executing section JS...

binaries/data/mods/public/gui/loadgame/load.js
|  34| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  51|  51| 		toDeleteNames.push(gameSelection.list[selected]);
|  52|  52| 	}
|  53|  53| 	else
|  54|    |-	{
|    |  54|+	
|  55|  55| 		for (let selected of gameSelection.multiSelected)
|  56|  56| 		{
|  57|  57| 			toDelete.push(gameSelection.list_data[selected]);
|  58|  58| 			toDeleteNames.push(gameSelection.list[selected]);
|  59|  59| 		}
|  60|    |-	}
|    |  60|+	
|  61|  61| 
|  62|  62| 	if (Engine.HotkeyIsPressed("session.savedgames.noconfirmation"))
|  63|  63| 		reallyDeleteGame(toDelete);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  67|  67| 			sprintf(translate("\"%(label)s\""), {
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|    |-			"Saved game will be permanently deleted, are you sure?",
|    |  70|+				"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|    |-			"Saved games will be permanently deleted, are you sure?",
|    |  71|+				"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|    |-			toDeleteNames.length
|    |  72|+				toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|  75|  75| 			[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  80|  80| function reallyDeleteGame(gameIDs)
|  81|  81| {
|  82|  82| 	for (let gameID of gameIDs)
|  83|    |-	{
|    |  83|+	
|  84|  84| 		if (!Engine.DeleteSavedGame(gameID))
|  85|  85| 			error("Could not delete saved game: " + gameID);
|  86|    |-	}
|    |  86|+	
|  87|  87| 	// Run init again to refresh saved game list
|  88|  88| 	init();
|  89|  89| }

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 167| 167| 		directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 168| 168| 	}
| 169| 169| 	else
| 170|    |-	{
|    | 170|+	
| 171| 171| 		for (selected of replaySelection.multiSelected)
| 172| 172| 		{
| 173| 173| 			directories.push(g_ReplaysFiltered[selected].directory);
| 174| 174| 			directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 175| 175| 		}
| 176|    |-	}
|    | 176|+	
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180|    |-		"Are you sure you want to delete these replays permanently?",
|    | 180|+			"Are you sure you want to delete these replays permanently?",
| 181| 181| 		directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180| 180| 		"Are you sure you want to delete these replays permanently?",
| 181|    |-		directories.length
|    | 181|+			directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
| 184| 184| 		translatePlural("Delete replay", "Delete replays", directories.length),
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 200| 200| 	if (!replaySelection.multiSelected.length)
| 201| 201| 		directories.push(g_ReplaysFiltered[selected].directory);
| 202| 202| 	else
| 203|    |-	{
|    | 203|+	
| 204| 204| 		for (selected of replaySelection.multiSelected)
| 205| 205| 			directories.push(g_ReplaysFiltered[selected].directory);
| 206|    |-	}
|    | 206|+	
| 207| 207| 	reallyDeleteReplay(directories);
| 208| 208| }
| 209| 209| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 218| 218| 	var selectedIndex = replaySelection.selected;
| 219| 219| 
| 220| 220| 	for (let replayDirectory of replayDirectories)
| 221|    |-	{
|    | 221|+	
| 222| 222| 		if (!Engine.DeleteReplay(replayDirectory))
| 223| 223| 			error("Could not delete replay!");
| 224|    |-	}
|    | 224|+	
| 225| 225| 
| 226| 226| 	// Refresh replay list
| 227| 227| 	init();
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1383/display/redirect

Angen updated this revision to Diff 7996.May 13 2019, 6:04 PM

acutally backup comments and years before trying to experiment

Stan added a comment.May 13 2019, 6:04 PM

Just saw you planned changes XD

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
76 ↗(On Diff #7992)

does whatever uses that checks for null or undefined ?

83 ↗(On Diff #7992)

remove braces.

binaries/data/mods/public/gui/replaymenu/replay_actions.js
194

remove braces

206

remove braces.

source/gui/CGUIList.h
1 ↗(On Diff #7992)

Year.

18 ↗(On Diff #6168)

You don't change that file at all so you might want to move it out of the diff.

source/gui/CGUISeries.h
1 ↗(On Diff #7992)

Year.

17 ↗(On Diff #7992)

You don't change that file at all so you might want to move it out of the diff.

source/gui/CIntList.h
2

Year

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/gui/CGUIList.h
|   1| /*·Copyright·(C)·2009·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2009"

source/gui/CGUISeries.h
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"
Executing section JS...

binaries/data/mods/public/gui/loadgame/load.js
|  34| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 167| 167| 		directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 168| 168| 	}
| 169| 169| 	else
| 170|    |-	{
|    | 170|+	
| 171| 171| 		for (selected of replaySelection.multiSelected)
| 172| 172| 		{
| 173| 173| 			directories.push(g_ReplaysFiltered[selected].directory);
| 174| 174| 			directoryNames.push(Engine.GetReplayDirectoryName(g_ReplaysFiltered[selected].directory));
| 175| 175| 		}
| 176|    |-	}
|    | 176|+	
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 177| 177| 	messageBox(
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180|    |-		"Are you sure you want to delete these replays permanently?",
|    | 180|+			"Are you sure you want to delete these replays permanently?",
| 181| 181| 		directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 178| 178| 		500, 200,
| 179| 179| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 180| 180| 		"Are you sure you want to delete these replays permanently?",
| 181|    |-		directories.length
|    | 181|+			directories.length
| 182| 182| 		) + "\n" +
| 183| 183| 			escapeText(directoryNames.join("\n")),
| 184| 184| 		translatePlural("Delete replay", "Delete replays", directories.length),
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 200| 200| 	if (!replaySelection.multiSelected.length)
| 201| 201| 		directories.push(g_ReplaysFiltered[selected].directory);
| 202| 202| 	else
| 203|    |-	{
|    | 203|+	
| 204| 204| 		for (selected of replaySelection.multiSelected)
| 205| 205| 			directories.push(g_ReplaysFiltered[selected].directory);
| 206|    |-	}
|    | 206|+	
| 207| 207| 	reallyDeleteReplay(directories);
| 208| 208| }
| 209| 209| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 218| 218| 	var selectedIndex = replaySelection.selected;
| 219| 219| 
| 220| 220| 	for (let replayDirectory of replayDirectories)
| 221|    |-	{
|    | 221|+	
| 222| 222| 		if (!Engine.DeleteReplay(replayDirectory))
| 223| 223| 			error("Could not delete replay!");
| 224|    |-	}
|    | 224|+	
| 225| 225| 
| 226| 226| 	// Refresh replay list
| 227| 227| 	init();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  51|  51| 		toDeleteNames.push(gameSelection.list[selected]);
|  52|  52| 	}
|  53|  53| 	else
|  54|    |-	{
|    |  54|+	
|  55|  55| 		for (let selected of gameSelection.multiSelected)
|  56|  56| 		{
|  57|  57| 			toDelete.push(gameSelection.list_data[selected]);
|  58|  58| 			toDeleteNames.push(gameSelection.list[selected]);
|  59|  59| 		}
|  60|    |-	}
|    |  60|+	
|  61|  61| 
|  62|  62| 	if (Engine.HotkeyIsPressed("session.savedgames.noconfirmation"))
|  63|  63| 		reallyDeleteGame(toDelete);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  67|  67| 			sprintf(translate("\"%(label)s\""), {
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|    |-			"Saved game will be permanently deleted, are you sure?",
|    |  70|+				"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  68|  68| 				"label": toDeleteNames.join("\n")
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|    |-			"Saved games will be permanently deleted, are you sure?",
|    |  71|+				"Saved games will be permanently deleted, are you sure?",
|  72|  72| 			toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  69|  69| 			}) + "\n" + translatePlural(
|  70|  70| 			"Saved game will be permanently deleted, are you sure?",
|  71|  71| 			"Saved games will be permanently deleted, are you sure?",
|  72|    |-			toDeleteNames.length
|    |  72|+				toDeleteNames.length
|  73|  73| 			),
|  74|  74| 			translate("DELETE"),
|  75|  75| 			[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  80|  80| function reallyDeleteGame(gameIDs)
|  81|  81| {
|  82|  82| 	for (let gameID of gameIDs)
|  83|    |-	{
|    |  83|+	
|  84|  84| 		if (!Engine.DeleteSavedGame(gameID))
|  85|  85| 			error("Could not delete saved game: " + gameID);
|  86|    |-	}
|    |  86|+	
|  87|  87| 	// Run init again to refresh saved game list
|  88|  88| 	init();
|  89|  89| }

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.

binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  55| »   »   for·(let·selected·of·gameSelection.multiSelected)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'selected' is already declared in the upper scope.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1385/display/redirect

Angen updated this revision to Diff 8027.May 14 2019, 2:30 PM

allways use multiselection array for list and olist

(dropdown inherit from list - I need to keep selected variable approach implemented - do not want to dropdown refactor too)

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  58|  58| 			sprintf(translate("\"%(label)s\""), {
|  59|  59| 				"label": toDeleteNames.join("\n")
|  60|  60| 			}) + "\n" + translatePlural(
|  61|    |-			"Saved game will be permanently deleted, are you sure?",
|    |  61|+				"Saved game will be permanently deleted, are you sure?",
|  62|  62| 			"Saved games will be permanently deleted, are you sure?",
|  63|  63| 			toDeleteNames.length
|  64|  64| 			),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  59|  59| 				"label": toDeleteNames.join("\n")
|  60|  60| 			}) + "\n" + translatePlural(
|  61|  61| 			"Saved game will be permanently deleted, are you sure?",
|  62|    |-			"Saved games will be permanently deleted, are you sure?",
|    |  62|+				"Saved games will be permanently deleted, are you sure?",
|  63|  63| 			toDeleteNames.length
|  64|  64| 			),
|  65|  65| 			translate("DELETE"),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  60|  60| 			}) + "\n" + translatePlural(
|  61|  61| 			"Saved game will be permanently deleted, are you sure?",
|  62|  62| 			"Saved games will be permanently deleted, are you sure?",
|  63|    |-			toDeleteNames.length
|    |  63|+				toDeleteNames.length
|  64|  64| 			),
|  65|  65| 			translate("DELETE"),
|  66|  66| 			[translate("No"), translate("Yes")],

binaries/data/mods/public/gui/loadgame/load.js
|  34| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  47|  47|  * The playerlist will be assembled using these values.
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|    |-	"available": { "color": "0 219 0",     "status": translate("Online") },
|    |  50|+	"available": { "color": "0 219 0", "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'away'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|    |-	"away":      { "color": "229 76 13",   "status": translate("Away") },
|    |  51|+	"away": { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|    |-	"away":      { "color": "229 76 13",   "status": translate("Away") },
|    |  51|+	"away":      { "color": "229 76 13", "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'playing'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|    |-	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|    |  52|+	"playing": { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|    |-	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|    |  52|+	"playing":   { "color": "200 0 0", "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'offline'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|    |-	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    |  53|+	"offline": { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|    |-	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    |  53|+	"offline":   { "color": "0 0 0", "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'unknown'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|    |-	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    |  54|+	"unknown": { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|  57|  57| var g_RoleNames = {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 219| 219| 					me ?
| 220| 220| 						translate("You have been muted.") :
| 221| 221| 						translate("%(nick)s has been muted.") :
| 222|    |-				newrole == "moderator" ?
|    | 222|+					newrole == "moderator" ?
| 223| 223| 					me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 220| 220| 						translate("You have been muted.") :
| 221| 221| 						translate("%(nick)s has been muted.") :
| 222| 222| 				newrole == "moderator" ?
| 223|    |-					me ?
|    | 223|+						me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 221| 221| 						translate("%(nick)s has been muted.") :
| 222| 222| 				newrole == "moderator" ?
| 223| 223| 					me ?
| 224|    |-						translate("You are now a moderator.") :
|    | 224|+							translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 222| 222| 				newrole == "moderator" ?
| 223| 223| 					me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225|    |-						translate("%(nick)s is now a moderator.") :
|    | 225|+							translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 223| 223| 					me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226|    |-				msg.oldrole == "visitor" ?
|    | 226|+						msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227|    |-					me ?
|    | 227|+							me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228|    |-						translate("You have been unmuted.") :
|    | 228|+								translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229|    |-						translate("%(nick)s has been unmuted.") :
|    | 229|+								translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
| 232| 232| 						translate("%(nick)s is not a moderator anymore.");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230|    |-					me ?
|    | 230|+							me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
| 232| 232| 						translate("%(nick)s is not a moderator anymore.");
| 233| 233| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231|    |-						translate("You are not a moderator anymore.") :
|    | 231|+								translate("You are not a moderator anymore.") :
| 232| 232| 						translate("%(nick)s is not a moderator anymore.");
| 233| 233| 
| 234| 234| 			addChatMessage({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
| 232|    |-						translate("%(nick)s is not a moderator anymore.");
|    | 232|+								translate("%(nick)s is not a moderator anymore.");
| 233| 233| 
| 234| 234| 			addChatMessage({
| 235| 235| 				"text": "/special " + sprintf(txt, { "nick": msg.nick }),
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 777| 777| function toggleBuddy()
| 778| 778| {
| 779| 779| 	let playerList = Engine.GetGUIObjectByName("playersBox");
| 780|    |-	
|    | 780|+
| 781| 781| 	let selected  = playerList.multiSelected[0];
| 782| 782| 	let name = playerList.list[selected];
| 783| 783| 	if (!name || name == g_Username || name.indexOf(g_BuddyListDelimiter) != -1)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '='.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 778| 778| {
| 779| 779| 	let playerList = Engine.GetGUIObjectByName("playersBox");
| 780| 780| 	
| 781|    |-	let selected  = playerList.multiSelected[0];
|    | 781|+	let selected = playerList.multiSelected[0];
| 782| 782| 	let name = playerList.list[selected];
| 783| 783| 	if (!name || name == g_Username || name.indexOf(g_BuddyListDelimiter) != -1)
| 784| 784| 		return;
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 998| 998| 	let sortBy = gamesBox.selected_column;
| 999| 999| 	let sortOrder = gamesBox.selected_column_order;
|1000|1000| 	let selected = gamesBox.multiSelected.length ? gamesBox.multiSelected[0] : -1;
|1001|    |-	
|    |1001|+
|1002|1002| 	if (selected > -1)
|1003|1003| 	{
|1004|1004| 		g_SelectedGameIP = g_GameList[gamesBox.selected].ip;

binaries/data/mods/public/gui/lobby/lobby.js
| 829| »   »   »   else·if·(!foundAsObserver)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/gui/lobby/lobby.js
|1047| »   »   switch·(sortBy)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/lobby/lobby.js
| 730| »   »   case·'name':
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'default'.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 168| 168| 	messageBox(
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171|    |-		"Are you sure you want to delete these replays permanently?",
|    | 171|+			"Are you sure you want to delete these replays permanently?",
| 172| 172| 		directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171| 171| 		"Are you sure you want to delete these replays permanently?",
| 172|    |-		directories.length
|    | 172|+			directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
| 175| 175| 		translatePlural("Delete replay", "Delete replays", directories.length),
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 203| 203| 	let selectedIndex = replaySelection.selected;
| 204| 204| 
| 205| 205| 	for (let replayDirectory of replayDirectories)
| 206|    |-	{
|    | 206|+	
| 207| 207| 		if (!Engine.DeleteReplay(replayDirectory))
| 208| 208| 			error("Could not delete replay!");
| 209|    |-	}
|    | 209|+	
| 210| 210| 
| 211| 211| 	// Refresh replay list
| 212| 212| 	init();

binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 190| »   for·(selected·of·replaySelection.multiSelected)
|    | [NORMAL] JSHintBear:
|    | Creating global 'for' variable. Should be 'for (var selected ...'.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1406/display/redirect

Angen planned changes to this revision.May 14 2019, 3:47 PM

modio list

Angen updated this revision to Diff 8028.May 14 2019, 5:19 PM

modio list

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  58|  58| 			sprintf(translate("\"%(label)s\""), {
|  59|  59| 				"label": toDeleteNames.join("\n")
|  60|  60| 			}) + "\n" + translatePlural(
|  61|    |-			"Saved game will be permanently deleted, are you sure?",
|    |  61|+				"Saved game will be permanently deleted, are you sure?",
|  62|  62| 			"Saved games will be permanently deleted, are you sure?",
|  63|  63| 			toDeleteNames.length
|  64|  64| 			),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  59|  59| 				"label": toDeleteNames.join("\n")
|  60|  60| 			}) + "\n" + translatePlural(
|  61|  61| 			"Saved game will be permanently deleted, are you sure?",
|  62|    |-			"Saved games will be permanently deleted, are you sure?",
|    |  62|+				"Saved games will be permanently deleted, are you sure?",
|  63|  63| 			toDeleteNames.length
|  64|  64| 			),
|  65|  65| 			translate("DELETE"),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/functions_utility_loadsave.js
|  60|  60| 			}) + "\n" + translatePlural(
|  61|  61| 			"Saved game will be permanently deleted, are you sure?",
|  62|  62| 			"Saved games will be permanently deleted, are you sure?",
|  63|    |-			toDeleteNames.length
|    |  63|+				toDeleteNames.length
|  64|  64| 			),
|  65|  65| 			translate("DELETE"),
|  66|  66| 			[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 168| 168| 	messageBox(
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171|    |-		"Are you sure you want to delete these replays permanently?",
|    | 171|+			"Are you sure you want to delete these replays permanently?",
| 172| 172| 		directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171| 171| 		"Are you sure you want to delete these replays permanently?",
| 172|    |-		directories.length
|    | 172|+			directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
| 175| 175| 		translatePlural("Delete replay", "Delete replays", directories.length),

binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 190| »   for·(selected·of·replaySelection.multiSelected)
|    | [NORMAL] JSHintBear:
|    | Creating global 'for' variable. Should be 'for (var selected ...'.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/mod/gui/modmod/modmod.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/mod/gui/modmod/modmod.js
| 236| 236| 	else
| 237| 237| 		modsEnabledList.multiSelected = [enPos];
| 238| 238| 	modsEnabledList.selected = enPos;
| 239|    |-	
|    | 239|+
| 240| 240| 	if (disPos == -1)
| 241| 241| 		modsDisabledList.multiSelected = [];
| 242| 242| 	else
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/mod/gui/modmod/modmod.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/mod/gui/modmod/modmod.js
| 243| 243| 		modsDisabledList.multiSelected = [disPos];
| 244| 244| 
| 245| 245| 	modsDisabledList.selected = disPos;
| 246|    |-	
|    | 246|+
| 247| 247| 	Engine.GetGUIObjectByName("globalModDescription").caption = "";
| 248| 248| }
| 249| 249| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/mod/gui/modmod/modmod.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/mod/gui/modmod/modmod.js
| 377| 377| 
| 378| 378| 	g_ModsEnabled.sort((folder1, folder2) =>
| 379| 379| 		dependencies[folder1].indexOf(g_Mods[folder2].name) != -1 ? 1 :
| 380|    |-		dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
|    | 380|+			dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
| 381| 381| 
| 382| 382| 	displayModList("modsEnabledList", g_ModsEnabled);
| 383| 383| }
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  47|  47|  * The playerlist will be assembled using these values.
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|    |-	"available": { "color": "0 219 0",     "status": translate("Online") },
|    |  50|+	"available": { "color": "0 219 0", "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'away'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|    |-	"away":      { "color": "229 76 13",   "status": translate("Away") },
|    |  51|+	"away": { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|    |-	"away":      { "color": "229 76 13",   "status": translate("Away") },
|    |  51|+	"away":      { "color": "229 76 13", "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'playing'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|    |-	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|    |  52|+	"playing": { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|    |-	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|    |  52|+	"playing":   { "color": "200 0 0", "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'offline'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|    |-	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    |  53|+	"offline": { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|    |-	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    |  53|+	"offline":   { "color": "0 0 0", "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'unknown'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|    |-	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    |  54|+	"unknown": { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|  57|  57| var g_RoleNames = {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 219| 219| 					me ?
| 220| 220| 						translate("You have been muted.") :
| 221| 221| 						translate("%(nick)s has been muted.") :
| 222|    |-				newrole == "moderator" ?
|    | 222|+					newrole == "moderator" ?
| 223| 223| 					me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 220| 220| 						translate("You have been muted.") :
| 221| 221| 						translate("%(nick)s has been muted.") :
| 222| 222| 				newrole == "moderator" ?
| 223|    |-					me ?
|    | 223|+						me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 221| 221| 						translate("%(nick)s has been muted.") :
| 222| 222| 				newrole == "moderator" ?
| 223| 223| 					me ?
| 224|    |-						translate("You are now a moderator.") :
|    | 224|+							translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 222| 222| 				newrole == "moderator" ?
| 223| 223| 					me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225|    |-						translate("%(nick)s is now a moderator.") :
|    | 225|+							translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 223| 223| 					me ?
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226|    |-				msg.oldrole == "visitor" ?
|    | 226|+						msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 224| 224| 						translate("You are now a moderator.") :
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227|    |-					me ?
|    | 227|+							me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 225| 225| 						translate("%(nick)s is now a moderator.") :
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228|    |-						translate("You have been unmuted.") :
|    | 228|+								translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 226| 226| 				msg.oldrole == "visitor" ?
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229|    |-						translate("%(nick)s has been unmuted.") :
|    | 229|+								translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
| 232| 232| 						translate("%(nick)s is not a moderator anymore.");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 227| 227| 					me ?
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230|    |-					me ?
|    | 230|+							me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
| 232| 232| 						translate("%(nick)s is not a moderator anymore.");
| 233| 233| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 228| 228| 						translate("You have been unmuted.") :
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231|    |-						translate("You are not a moderator anymore.") :
|    | 231|+								translate("You are not a moderator anymore.") :
| 232| 232| 						translate("%(nick)s is not a moderator anymore.");
| 233| 233| 
| 234| 234| 			addChatMessage({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 229| 229| 						translate("%(nick)s has been unmuted.") :
| 230| 230| 					me ?
| 231| 231| 						translate("You are not a moderator anymore.") :
| 232|    |-						translate("%(nick)s is not a moderator anymore.");
|    | 232|+								translate("%(nick)s is not a moderator anymore.");
| 233| 233| 
| 234| 234| 			addChatMessage({
| 235| 235| 				"text": "/special " + sprintf(txt, { "nick": msg.nick }),
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 777| 777| function toggleBuddy()
| 778| 778| {
| 779| 779| 	let playerList = Engine.GetGUIObjectByName("playersBox");
| 780|    |-	
|    | 780|+
| 781| 781| 	let selected  = playerList.multiSelected[0];
| 782| 782| 	let name = playerList.list[selected];
| 783| 783| 	if (!name || name == g_Username || name.indexOf(g_BuddyListDelimiter) != -1)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '='.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 778| 778| {
| 779| 779| 	let playerList = Engine.GetGUIObjectByName("playersBox");
| 780| 780| 	
| 781|    |-	let selected  = playerList.multiSelected[0];
|    | 781|+	let selected = playerList.multiSelected[0];
| 782| 782| 	let name = playerList.list[selected];
| 783| 783| 	if (!name || name == g_Username || name.indexOf(g_BuddyListDelimiter) != -1)
| 784| 784| 		return;
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/lobby/lobby.js
| 998| 998| 	let sortBy = gamesBox.selected_column;
| 999| 999| 	let sortOrder = gamesBox.selected_column_order;
|1000|1000| 	let selected = gamesBox.multiSelected.length ? gamesBox.multiSelected[0] : -1;
|1001|    |-	
|    |1001|+
|1002|1002| 	if (selected > -1)
|1003|1003| 	{
|1004|1004| 		g_SelectedGameIP = g_GameList[gamesBox.selected].ip;

binaries/data/mods/public/gui/lobby/lobby.js
| 829| »   »   »   else·if·(!foundAsObserver)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/gui/lobby/lobby.js
|1047| »   »   switch·(sortBy)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/lobby/lobby.js
| 730| »   »   case·'name':
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'default'.

binaries/data/mods/public/gui/loadgame/load.js
|  34| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1407/display/redirect

elexis edited the summary of this revision. (Show Details)Thu, Sep 19, 1:09 AM
elexis updated this revision to Diff 9848.Thu, Sep 19, 1:13 AM

Rebase for september 2019.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/239/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/gui/CIntList.h
|  23| class·CIntList
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCIntList{' is invalid C code. Use --std or --language to configure the language.

source/gui/CList.h
|  33| class·CList·:·public·IGUIScrollBarOwner,·public·IGUITextOwner
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCList:' is invalid C code. Use --std or --language to configure the language.

source/gui/GUI.h
|  23| #include·<string>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCGUIList{' is invalid C code. Use --std or --language to configure the language.

source/gui/COList.h
|  23| /**
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCGUIList{' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|  16|  16| 	let confirmButton = Engine.GetGUIObjectByName("confirmButton");
|  17|  17| 	confirmButton.caption = save ? translate("Save") : translate("Load");
|  18|  18| 	confirmButton.onPress = save ? () => { g_SavegameWriter.saveGame(); } : loadGame;
|  19|    |-	Engine.GetGUIObjectByName("title").caption = save ? translate("Save Game") : translate("Load Game")
|    |  19|+	Engine.GetGUIObjectByName("title").caption = save ? translate("Save Game") : translate("Load Game");
|  20|  20| 	Engine.GetGUIObjectByName("saveGameDesc").hidden = !save;
|  21|  21| 
|  22|  22| 	updateSavegameList();
|    | [NORMAL] ESLintBear (semi-spacing):
|    | Missing whitespace after semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
| 132| 132| 
| 133| 133| 	Engine.GetGUIObjectByName("confirmButton").enabled =
| 134| 134| 		(!!metadata || Engine.IsGameStarted()) &&
| 135|    |-		gameSelection.multiSelected.length == 1;;
|    | 135|+		gameSelection.multiSelected.length == 1; ;
| 136| 136| 
| 137| 137| 	Engine.GetGUIObjectByName("deleteGameButton").enabled = !!metadata;
| 138| 138| 
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
| 132| 132| 
| 133| 133| 	Engine.GetGUIObjectByName("confirmButton").enabled =
| 134| 134| 		(!!metadata || Engine.IsGameStarted()) &&
| 135|    |-		gameSelection.multiSelected.length == 1;;
|    | 135|+		gameSelection.multiSelected.length == 1;
| 136| 136| 
| 137| 137| 	Engine.GetGUIObjectByName("deleteGameButton").enabled = !!metadata;
| 138| 138| 

binaries/data/mods/public/gui/loadgame/load.js
|  64| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/loadgame/load.js
|  19| »   Engine.GetGUIObjectByName("title").caption·=·save·?·translate("Save·Game")·:·translate("Load·Game")
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/gui/loadgame/load.js
| 135| »   »   gameSelection.multiSelected.length·==·1;;
|    | [NORMAL] JSHintBear:
|    | Unnecessary semicolon.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 168| 168| 	messageBox(
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171|    |-		"Are you sure you want to delete these replays permanently?",
|    | 171|+			"Are you sure you want to delete these replays permanently?",
| 172| 172| 		directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171| 171| 		"Are you sure you want to delete these replays permanently?",
| 172|    |-		directories.length
|    | 172|+			directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
| 175| 175| 		translatePlural("Delete replay", "Delete replays", directories.length),

binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 190| »   for·(selected·of·replaySelection.multiSelected)
|    | [NORMAL] JSHintBear:
|    | Creating global 'for' variable. Should be 'for (var selected ...'.

binaries/data/mods/public/gui/loadgame/functions_utility_loadsave.js
|  72| »   for·(let·gameID·of·gameIDs)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'gameID' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/mod/gui/modmod/modmod.js
|    |++++| /zpool0/trunk/binaries/data/mods/mod/gui/modmod/modmod.js
| 377| 377| 
| 378| 378| 	g_ModsEnabled.sort((folder1, folder2) =>
| 379| 379| 		dependencies[folder1].indexOf(g_Mods[folder2].name) != -1 ? 1 :
| 380|    |-		dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
|    | 380|+			dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
| 381| 381| 
| 382| 382| 	displayModList("modsEnabledList", g_ModsEnabled);
| 383| 383| }
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  47|  47|  * The playerlist will be assembled using these values.
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|    |-	"available": { "color": "0 219 0",     "status": translate("Online") },
|    |  50|+	"available": { "color": "0 219 0", "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'away'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|    |-	"away":      { "color": "229 76 13",   "status": translate("Away") },
|    |  51|+	"away": { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  48|  48|  */
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|    |-	"away":      { "color": "229 76 13",   "status": translate("Away") },
|    |  51|+	"away":      { "color": "229 76 13", "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'playing'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|    |-	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|    |  52|+	"playing": { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  49|  49| var g_PlayerStatuses = {
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|    |-	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|    |  52|+	"playing":   { "color": "200 0 0", "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'offline'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|    |-	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    |  53|+	"offline": { "color": "0 0 0",       "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '"status"'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  50|  50| 	"available": { "color": "0 219 0",     "status": translate("Online") },
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|    |-	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|    |  53|+	"offline":   { "color": "0 0 0", "status": translate("Offline") },
|  54|  54| 	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space before value for key 'unknown'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|  51|  51| 	"away":      { "color": "229 76 13",   "status": translate("Away") },
|  52|  52| 	"playing":   { "color": "200 0 0",     "status": translate("Busy") },
|  53|  53| 	"offline":   { "color": "0 0 0",       "status": translate("Offline") },
|  54|    |-	"unknown":   { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|    |  54|+	"unknown": { "color": "178 178 178", "status": translateWithContext("lobby presence", "Unknown") }
|  55|  55| };
|  56|  56| 
|  57|  57| var g_RoleNames = {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 210| 210| 					me ?
| 211| 211| 						translate("You have been muted.") :
| 212| 212| 						translate("%(nick)s has been muted.") :
| 213|    |-				msg.newrole == "moderator" ?
|    | 213|+					msg.newrole == "moderator" ?
| 214| 214| 					me ?
| 215| 215| 						translate("You are now a moderator.") :
| 216| 216| 						translate("%(nick)s is now a moderator.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 211| 211| 						translate("You have been muted.") :
| 212| 212| 						translate("%(nick)s has been muted.") :
| 213| 213| 				msg.newrole == "moderator" ?
| 214|    |-					me ?
|    | 214|+						me ?
| 215| 215| 						translate("You are now a moderator.") :
| 216| 216| 						translate("%(nick)s is now a moderator.") :
| 217| 217| 				msg.oldrole == "visitor" ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 212| 212| 						translate("%(nick)s has been muted.") :
| 213| 213| 				msg.newrole == "moderator" ?
| 214| 214| 					me ?
| 215|    |-						translate("You are now a moderator.") :
|    | 215|+							translate("You are now a moderator.") :
| 216| 216| 						translate("%(nick)s is now a moderator.") :
| 217| 217| 				msg.oldrole == "visitor" ?
| 218| 218| 					me ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 213| 213| 				msg.newrole == "moderator" ?
| 214| 214| 					me ?
| 215| 215| 						translate("You are now a moderator.") :
| 216|    |-						translate("%(nick)s is now a moderator.") :
|    | 216|+							translate("%(nick)s is now a moderator.") :
| 217| 217| 				msg.oldrole == "visitor" ?
| 218| 218| 					me ?
| 219| 219| 						translate("You have been unmuted.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 214| 214| 					me ?
| 215| 215| 						translate("You are now a moderator.") :
| 216| 216| 						translate("%(nick)s is now a moderator.") :
| 217|    |-				msg.oldrole == "visitor" ?
|    | 217|+						msg.oldrole == "visitor" ?
| 218| 218| 					me ?
| 219| 219| 						translate("You have been unmuted.") :
| 220| 220| 						translate("%(nick)s has been unmuted.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 215| 215| 						translate("You are now a moderator.") :
| 216| 216| 						translate("%(nick)s is now a moderator.") :
| 217| 217| 				msg.oldrole == "visitor" ?
| 218|    |-					me ?
|    | 218|+							me ?
| 219| 219| 						translate("You have been unmuted.") :
| 220| 220| 						translate("%(nick)s has been unmuted.") :
| 221| 221| 					me ?
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 216| 216| 						translate("%(nick)s is now a moderator.") :
| 217| 217| 				msg.oldrole == "visitor" ?
| 218| 218| 					me ?
| 219|    |-						translate("You have been unmuted.") :
|    | 219|+								translate("You have been unmuted.") :
| 220| 220| 						translate("%(nick)s has been unmuted.") :
| 221| 221| 					me ?
| 222| 222| 						translate("You are not a moderator anymore.") :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 217| 217| 				msg.oldrole == "visitor" ?
| 218| 218| 					me ?
| 219| 219| 						translate("You have been unmuted.") :
| 220|    |-						translate("%(nick)s has been unmuted.") :
|    | 220|+								translate("%(nick)s has been unmuted.") :
| 221| 221| 					me ?
| 222| 222| 						translate("You are not a moderator anymore.") :
| 223| 223| 						translate("%(nick)s is not a moderator anymore.");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 218| 218| 					me ?
| 219| 219| 						translate("You have been unmuted.") :
| 220| 220| 						translate("%(nick)s has been unmuted.") :
| 221|    |-					me ?
|    | 221|+							me ?
| 222| 222| 						translate("You are not a moderator anymore.") :
| 223| 223| 						translate("%(nick)s is not a moderator anymore.");
| 224| 224| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 219| 219| 						translate("You have been unmuted.") :
| 220| 220| 						translate("%(nick)s has been unmuted.") :
| 221| 221| 					me ?
| 222|    |-						translate("You are not a moderator anymore.") :
|    | 222|+								translate("You are not a moderator anymore.") :
| 223| 223| 						translate("%(nick)s is not a moderator anymore.");
| 224| 224| 
| 225| 225| 			addChatMessage({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 220| 220| 						translate("%(nick)s has been unmuted.") :
| 221| 221| 					me ?
| 222| 222| 						translate("You are not a moderator anymore.") :
| 223|    |-						translate("%(nick)s is not a moderator anymore.");
|    | 223|+								translate("%(nick)s is not a moderator anymore.");
| 224| 224| 
| 225| 225| 			addChatMessage({
| 226| 226| 				"text": "/special " + sprintf(txt, { "nick": msg.nick }),
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before '='.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/lobby/lobby.js
| 755| 755| {
| 756| 756| 	let playerList = Engine.GetGUIObjectByName("playersBox");
| 757| 757| 
| 758|    |-	let selected  = playerList.multiSelected[0];
|    | 758|+	let selected = playerList.multiSelected[0];
| 759| 759| 	let name = playerList.list[selected];
| 760| 760| 	if (!name || name == g_Username || name.indexOf(g_BuddyListDelimiter) != -1)
| 761| 761| 		return;

binaries/data/mods/public/gui/lobby/lobby.js
| 806| »   »   »   else·if·(!foundAsObserver)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/gui/lobby/lobby.js
|1024| »   »   switch·(sortBy)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/751/display/redirect

elexis requested changes to this revision.Thu, Sep 19, 2:08 AM

Relax grammar:

In D1346#55260, @Angen wrote:

I know about this:
multiSelection_enabled as param in xml - need to fix varning from validator

As of D1574 the invalid XML will be refused.
To be fixed in binaries/data/mods/mod/gui/gui.rng, rnc.

Setting naming:
Naming: multiSelected, multiSelection_enabled, notice that none of the other settings use capital letters, or camel case, or a mix thereof, so multiselect_enabled and multiselected, or similar.

Feature design:
On the feature design, there are multiple ways this could be implemented.
You implemented it as a GUI Object setting, i.e. it can be changed dynamically whether it should be single or multi selection.
But there are also some contradictions arising.
If it is multiselection, then the selected property makes no sense and can't do what its defined to do.
If it is single selection, then the multiselection property has that problem.
If im not mistaken, CDropdown inherits the multiselection features, but does it make sense to enable that for a dropdown?
The alternative is to implement to make CList an abstract class, implemented by a multi and a singleselection class.
CDropdown would inherit the singleselection one (and ordered list the multiselection one and maybe also provide a singleselection one).

Alternatively CList is always a multiselection one, but has a max_selection setting (with n=1 to mimic singleselection).
This however would complicate JS access for the single selection, which for dropdowns in particular would be ugly to adapt in JS.

I suppose we find strong use cases for singleselection olist? I see you added it to the lobby gamelist, but what's the benefit? One can join only one game, view only one game.
Actually its disabled for the lobby, but the multiselection properties are still set. That sounds wrong (https://en.wikipedia.org/wiki/Single_source_of_truth), since both store the current user selection, they shouldn't have to be kept in sync.

Data type design:
The CIntList datatype is a vector of integers. Thats irreducible, so should be fine.
However I see it is copy assigned via GetSetting, modified, then copy-assigned via SetSetting again.
Instead one could modify the reference directly and call SettingChanged to broadcast the setting-changed message, and make the class NONCOPYABLE (i.e. to delete the copy assignment operator and copy constructor of the class).

Graphics design:
When selecting many items in a row, it looks a big ugly. There should be a different sprite used that is tuned a bit better for this mutliselection.

So requested changes are:

  • Make sure the code actually works everywhere
  • Consider whether the abstract CList + CListSingle/CListMulti approach would be actually better or actually worse than the current appraoch. Consider how other popular UIs might implement that.

Other than that: do want!

binaries/data/mods/public/gui/replaymenu/replay_actions.js
211

Refers to selectedIndex, but that was deleted.

This revision now requires changes to proceed.Thu, Sep 19, 2:08 AM
Angen updated this revision to Diff 9863.Thu, Sep 19, 7:10 PM

Single, Multiple class design
Not synchronised with js
OList is Single for now

Angen planned changes to this revision.Thu, Sep 19, 7:11 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/249/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/761/display/redirect

Angen updated this revision to Diff 9872.Thu, Sep 19, 10:22 PM

something is wrong with olistsingle, olistmultiple

WARNING: Attempt to draw scrollbar without a style.

modio was not rebased because of ^

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/769/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/257/display/redirect

Angen planned changes to this revision.Fri, Sep 20, 7:41 AM
Angen added a comment.EditedFri, Sep 20, 9:29 AM

There are at least two m_ItemsYPositions and maybe more variables for COListSingle
one from COList
second from CListSingle

size CList = 1
size COList = 21
size CListSingle = 1

Edit: solved by virtual public Clist

Angen updated this revision to Diff 9876.Fri, Sep 20, 10:21 AM

working version

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/gui/CIntList.h
|  23| class·CIntList
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCIntList{' is invalid C code. Use --std or --language to configure the language.

source/gui/CDropDown.h
|  23| »   Works·just·like·a·list-box,·but·it·hides
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCGUIList{' is invalid C code. Use --std or --language to configure the language.

source/gui/CListMultiple.h
|  24| class·CListMultiple:·virtual·public·CList
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCListMultiple:' is invalid C code. Use --std or --language to configure the language.

source/gui/COListSingle.h
|  23| class·COListSingle·:·public·CListSingle,·public·COList
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCGUIList{' is invalid C code. Use --std or --language to configure the language.

source/gui/CList.h
|  32| class·CList·:·public·IGUIScrollBarOwner,·public·IGUITextOwner
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCList:' is invalid C code. Use --std or --language to configure the language.

source/gui/GUI.h
|  23| #include·<string>
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCGUIList{' is invalid C code. Use --std or --language to configure the language.

source/gui/CListSingle.h
|  23| class·CListSingle:·virtual·public·CList
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCListSingle:' is invalid C code. Use --std or --language to configure the language.

source/gui/COList.h
|  23| /**
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCGUIList{' is invalid C code. Use --std or --language to configure the language.

source/gui/COListMultiple.h
|  23| class·COListMultiple·:·public·COList,·public·CListMultiple
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCGUIList{' is invalid C code. Use --std or --language to configure the language.
Executing section JS...

binaries/data/mods/public/gui/loadgame/functions_utility_loadsave.js
|  72| »   for·(let·gameID·of·gameIDs)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'gameID' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 168| 168| 	messageBox(
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171|    |-		"Are you sure you want to delete these replays permanently?",
|    | 171|+			"Are you sure you want to delete these replays permanently?",
| 172| 172| 		directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 169| 169| 		500, 200,
| 170| 170| 		translatePlural("Are you sure you want to delete this replay permanently?",
| 171| 171| 		"Are you sure you want to delete these replays permanently?",
| 172|    |-		directories.length
|    | 172|+			directories.length
| 173| 173| 		) + "\n" +
| 174| 174| 			escapeText(directoryNames.join("\n")),
| 175| 175| 		translatePlural("Delete replay", "Delete replays", directories.length),

binaries/data/mods/public/gui/replaymenu/replay_actions.js
| 190| »   for·(selected·of·replaySelection.selected)
|    | [NORMAL] JSHintBear:
|    | Creating global 'for' variable. Should be 'for (var selected ...'.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|  16|  16| 	let confirmButton = Engine.GetGUIObjectByName("confirmButton");
|  17|  17| 	confirmButton.caption = save ? translate("Save") : translate("Load");
|  18|  18| 	confirmButton.onPress = save ? () => { g_SavegameWriter.saveGame(); } : loadGame;
|  19|    |-	Engine.GetGUIObjectByName("title").caption = save ? translate("Save Game") : translate("Load Game")
|    |  19|+	Engine.GetGUIObjectByName("title").caption = save ? translate("Save Game") : translate("Load Game");
|  20|  20| 	Engine.GetGUIObjectByName("saveGameDesc").hidden = !save;
|  21|  21| 
|  22|  22| 	updateSavegameList();
|    | [NORMAL] ESLintBear (semi-spacing):
|    | Missing whitespace after semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
| 131| 131| 
| 132| 132| 	Engine.GetGUIObjectByName("confirmButton").enabled =
| 133| 133| 		(!!metadata || Engine.IsGameStarted()) &&
| 134|    |-		gameSelection.selected.length == 1;;
|    | 134|+		gameSelection.selected.length == 1; ;
| 135| 135| 
| 136| 136| 	Engine.GetGUIObjectByName("deleteGameButton").enabled = !!metadata;
| 137| 137| 
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/loadgame/load.js
| 131| 131| 
| 132| 132| 	Engine.GetGUIObjectByName("confirmButton").enabled =
| 133| 133| 		(!!metadata || Engine.IsGameStarted()) &&
| 134|    |-		gameSelection.selected.length == 1;;
|    | 134|+		gameSelection.selected.length == 1;
| 135| 135| 
| 136| 136| 	Engine.GetGUIObjectByName("deleteGameButton").enabled = !!metadata;
| 137| 137| 

binaries/data/mods/public/gui/loadgame/load.js
|  64| »   »   switch·(sortKey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/loadgame/load.js
|  19| »   Engine.GetGUIObjectByName("title").caption·=·save·?·translate("Save·Game")·:·translate("Load·Game")
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/gui/loadgame/load.js
| 134| »   »   gameSelection.selected.length·==·1;;
|    | [NORMAL] JSHintBear:
|    | Unnecessary semicolon.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/771/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/259/display/redirect

Got some whitespace complaints by my local linter, marked in inline comments. If Jenkins doesnt have it it should learn that.

I get many compiler warnings with clang (I got those recently too and removed the warnings in rP22602, just dont use the override keyword unless its used everywhere, i.e. nowhere for now):

CDropDown.cpp
CGUI.cpp
In file included from ../../../source/gui/CGUI.cpp:34:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:64:15: warning: 'IsEnabledDoubleClick' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
../../../source/gui/CList.h:86:15: note: overridden virtual function is here
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
In file included from ../../../source/gui/CGUI.cpp:34:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:66:14: warning: 'GetLastSelected' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual int GetLastSelected() = 0;
                    ^
../../../source/gui/CList.h:88:14: note: overridden virtual function is here
        virtual int GetLastSelected() = 0;
                    ^
In file included from ../../../source/gui/CGUI.cpp:34:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:68:15: warning: 'DrawSelectedItems' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
../../../source/gui/CList.h:95:15: note: overridden virtual function is here
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
In file included from ../../../source/gui/CGUI.cpp:34:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:70:15: warning: 'SelectionControl' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void SelectionControl(int& select) = 0;
                     ^
../../../source/gui/CList.h:121:15: note: overridden virtual function is here
        virtual void SelectionControl(int& select) = 0;
                     ^
CGUIScrollBarVertical.cpp
make: *** [Makefile:121: atlas] Error 2
CGUISetting.cpp
CGUIString.cpp
CImage.cpp
CInput.cpp
CList.cpp
4 warnings generated.
CListMultiple.cpp
../../../source/gui/CList.cpp:468:29: warning: unsequenced modification and access to 'selected' [-Wunsequenced]
                UpdateSelection(selected, ++selected);
                                ~~~~~~~~  ^
../../../source/gui/CList.cpp:476:29: warning: unsequenced modification and access to 'selected' [-Wunsequenced]
                UpdateSelection(selected, --selected);
                                ~~~~~~~~  ^
../../../source/gui/CListMultiple.cpp:86:58: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
                        for (size_t itemId = m_MultiSelectionFromItem; itemId < select + 1; ++itemId)
                                                                       ~~~~~~ ^ ~~~~~~~~~~
../../../source/gui/CListMultiple.cpp:116:49: warning: unused parameter 'selected' [-Wunused-parameter]
void CListMultiple::DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect)
                                                ^
2 warnings generated.
CListSingle.cpp
2 warnings generated.
COList.cpp
COListMultiple.cpp
In file included from ../../../source/gui/COList.cpp:20:
../../../source/gui/COList.h:64:15: warning: 'IsEnabledDoubleClick' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
../../../source/gui/CList.h:86:15: note: overridden virtual function is here
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
In file included from ../../../source/gui/COList.cpp:20:
../../../source/gui/COList.h:66:14: warning: 'GetLastSelected' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual int GetLastSelected() = 0;
                    ^
../../../source/gui/CList.h:88:14: note: overridden virtual function is here
        virtual int GetLastSelected() = 0;
                    ^
In file included from ../../../source/gui/COList.cpp:20:
../../../source/gui/COList.h:68:15: warning: 'DrawSelectedItems' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
../../../source/gui/CList.h:95:15: note: overridden virtual function is here
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
In file included from ../../../source/gui/COList.cpp:20:
../../../source/gui/COList.h:70:15: warning: 'SelectionControl' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void SelectionControl(int& select) = 0;
                     ^
../../../source/gui/CList.h:121:15: note: overridden virtual function is here
        virtual void SelectionControl(int& select) = 0;
                     ^
In file included from ../../../source/gui/COListMultiple.cpp:20:
In file included from ../../../source/gui/COListMultiple.h:20:
../../../source/gui/COList.h:64:15: warning: 'IsEnabledDoubleClick' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
../../../source/gui/CList.h:86:15: note: overridden virtual function is here
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
In file included from ../../../source/gui/COListMultiple.cpp:20:
In file included from ../../../source/gui/COListMultiple.h:20:
../../../source/gui/COList.h:66:14: warning: 'GetLastSelected' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual int GetLastSelected() = 0;
                    ^
../../../source/gui/CList.h:88:14: note: overridden virtual function is here
        virtual int GetLastSelected() = 0;
                    ^
In file included from ../../../source/gui/COListMultiple.cpp:20:
In file included from ../../../source/gui/COListMultiple.h:20:
../../../source/gui/COList.h:68:15: warning: 'DrawSelectedItems' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
../../../source/gui/CList.h:95:15: note: overridden virtual function is here
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
In file included from ../../../source/gui/COListMultiple.cpp:20:
In file included from ../../../source/gui/COListMultiple.h:20:
../../../source/gui/COList.h:70:15: warning: 'SelectionControl' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void SelectionControl(int& select) = 0;
                     ^
../../../source/gui/CList.h:121:15: note: overridden virtual function is here
        virtual void SelectionControl(int& select) = 0;
                     ^
4 warnings generated.
COListSingle.cpp
CProgressBar.cpp
4 warnings generated.
CRadioButton.cpp
In file included from ../../../source/gui/COListSingle.cpp:20:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:64:15: warning: 'IsEnabledDoubleClick' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
../../../source/gui/CList.h:86:15: note: overridden virtual function is here
        virtual bool IsEnabledDoubleClick() = 0;
                     ^
In file included from ../../../source/gui/COListSingle.cpp:20:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:66:14: warning: 'GetLastSelected' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual int GetLastSelected() = 0;
                    ^
../../../source/gui/CList.h:88:14: note: overridden virtual function is here
        virtual int GetLastSelected() = 0;
                    ^
In file included from ../../../source/gui/COListSingle.cpp:20:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:68:15: warning: 'DrawSelectedItems' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
../../../source/gui/CList.h:95:15: note: overridden virtual function is here
        virtual void DrawSelectedItems(const int selected, const bool scrollbar, const float scroll, CGUISpriteInstance& sprite_selectarea, const int cell_id, const float bz, CRect& rect) = 0;
                     ^
In file included from ../../../source/gui/COListSingle.cpp:20:
In file included from ../../../source/gui/COListSingle.h:20:
../../../source/gui/COList.h:70:15: warning: 'SelectionControl' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void SelectionControl(int& select) = 0;
                     ^
../../../source/gui/CList.h:121:15: note: overridden virtual function is here
        virtual void SelectionControl(int& select) = 0;
                     ^
4 warnings generated.

See discussion about the use of virtual inheritance or not in IRC yesterday http://irclogs.wildfiregames.com/2019-09/2019-09-19-QuakeNet-%230ad-dev.log
Also the naming.

Vladislav noted that CList sounds a lot like something that could be used. But if it is an abstract class, it should become IList for consistency with IGUIObject, IGUISetting, IGUITextOwner, IGUIScrollbarOwner, ...

So the problem with virtual inheritance is mostly that it was considered a wrong pattern,
because it means one can't derive the derived class pointer from a given baseclass pointer by reinterpreting the pointer,
but that one has to use a dynamic_cast, which uses RTTI (Runtime Type Information), which is a C++ internal lookup table.
That was 80 times slower than the reinterpretation way when I tested for rP22596.
So we ended up adding a hack to that (storing a pointer to the derived IGUITextOwner class in the base class IGUIObject. That is conceptually bad because the base class should be agnostic of any child class, but it returns the right pointer 80 times faster...

The only way out was to remove the virtual inheritance.
I will look into it, perhaps it can be done within a day.
One alternative to virtual inheritance considered was to move the parent IList and IOList class to a separate class and adding a member variable to the single/multi derived classes. We will see.
If virtual inheritance removal fails, I suppose it can be used here as well. It shouldnt make it much much more difficult to remove later while keeping the code consistent until then.

binaries/data/mods/public/gui/replaymenu/replay_menu.js
82

if ( (whitespace)

source/gui/CList.cpp
186

remove trailing whitespace

457

no whitespace in empty linesa

482

no whitespace in empty lines

492

no whietspace in empty lines

TBH this sounds like a relatively good candidate for CRTP.