Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAA1002: DictionariesOrSetsShouldBeOrderedToEnumerate #1035

Merged
merged 5 commits into from Oct 19, 2020

Conversation

dahlia
Copy link
Contributor

@dahlia dahlia commented Oct 15, 2020

Added a new rule to ensure if dictionaries or sets are ordered before they are enumerated. See also the docs in LAA1002.md file.

FYI, with this rule, Lib9c has the below warnings (though there are quite many false alarms yet):

Action/SellCancellation.cs(50,87): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/AttachmentActionResult.cs(47,43): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/Sell.cs(24,87): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/SellCancellation.cs(43,47): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/Buy.cs(87,87): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/ChargeActionPoint.cs(53,13): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/Buy.cs(51,47): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/RewardGold.cs(17,43): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/CombinationConsumable.cs(84,24): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/CombinationConsumable.cs(53,32): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/Buy.cs(79,47): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
ReorgMiner.cs(89,43): error LAA1002: Enumerating an instance of System.Collections.Generic.HashSet<Libplanet.Tx.Transaction<Libplanet.Action.PolymorphicAction<Nekoyume.Action.ActionBase>>> is indeterministic since the order of System.Collections.Generic.HashSet<Libplanet.Tx.Transaction<Libplanet.Action.PolymorphicAction<Nekoyume.Action.ActionBase>>> is unspecified; explicitly sort them before enumerating.
Action/CreateAvatar.cs(31,87): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/CombinationEquipment.cs(221,13): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/DailyReward.cs(46,87): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/WorldInformation.cs(215,50): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, Nekoyume.Model.WorldInformation.World> is indeterministic since the order of System.Collections.Generic.Dictionary<int, Nekoyume.Model.WorldInformation.World> is unspecified; explicitly sort them before enumerating.
Model/WorldInformation.cs(282,21): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, Nekoyume.Model.WorldInformation.World> is indeterministic since the order of System.Collections.Generic.Dictionary<int, Nekoyume.Model.WorldInformation.World> is unspecified; explicitly sort them before enumerating.
Action/RedeemCode.cs(113,13): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Miner.cs(68,43): error LAA1002: Enumerating an instance of System.Collections.Generic.HashSet<Libplanet.Tx.Transaction<Libplanet.Action.PolymorphicAction<Nekoyume.Action.ActionBase>>> is indeterministic since the order of System.Collections.Generic.HashSet<Libplanet.Tx.Transaction<Libplanet.Action.PolymorphicAction<Nekoyume.Action.ActionBase>>> is unspecified; explicitly sort them before enumerating.
Action/HackAndSlash.cs(33,13): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/RapidCombination.cs(113,13): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/RapidCombination.cs(36,32): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Character/CharacterBase.cs(394,18): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, int> is indeterministic since the order of System.Collections.Generic.Dictionary<int, int> is unspecified; explicitly sort them before enumerating.
Model/Character/CharacterBase.cs(106,34): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Buff.Buff> is indeterministic since the order of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Buff.Buff> is unspecified; explicitly sort them before enumerating.
Model/Character/CharacterBase.cs(156,34): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Buff.Buff> is indeterministic since the order of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Buff.Buff> is unspecified; explicitly sort them before enumerating.
Action/RankingBattle.cs(162,13): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/WorldInformation.cs(78,54): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
TableData/Item/CostumeItemSheet.cs(32,81): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/CollectionMap.cs(56,20): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, int> is indeterministic since the order of System.Collections.Generic.Dictionary<int, int> is unspecified; explicitly sort them before enumerating.
TableData/Item/ConsumableItemSheet.cs(46,47): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/QuestReward.cs(68,87): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/InitializeStates.cs(168,51): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, string> is indeterministic since the order of System.Collections.Generic.Dictionary<string, string> is unspecified; explicitly sort them before enumerating.
Action/InitializeStates.cs(87,26): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, string> is indeterministic since the order of System.Collections.Generic.Dictionary<string, string> is unspecified; explicitly sort them before enumerating.
Action/InitializeStates.cs(90,26): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.Address, System.Collections.Immutable.ImmutableHashSet<Libplanet.Address>> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.Address, System.Collections.Immutable.ImmutableHashSet<Libplanet.Address>> is unspecified; explicitly sort them before enumerating.
Action/InitializeStates.cs(117,22): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, string> is indeterministic since the order of System.Collections.Generic.Dictionary<string, string> is unspecified; explicitly sort them before enumerating.
Action/InitializeStates.cs(120,22): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.Address, System.Collections.Immutable.ImmutableHashSet<Libplanet.Address>> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.Address, System.Collections.Immutable.ImmutableHashSet<Libplanet.Address>> is unspecified; explicitly sort them before enumerating.
TableData/Item/EquipmentItemSetEffectSheet.cs(53,24): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Stat.StatModifier> is indeterministic since the order of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Stat.StatModifier> is unspecified; explicitly sort them before enumerating.
Model/Quest/TradeQuest.cs(48,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/ShopItem.cs(46,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/QuestReward.cs(17,23): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, int> is indeterministic since the order of System.Collections.Generic.Dictionary<int, int> is unspecified; explicitly sort them before enumerating.
Model/Quest/CollectQuest.cs(57,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/CombinationEquipmentQuest.cs(66,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Mail/AttachmentMail.cs(29,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/Material.cs(66,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
TableData/RedeemRewardSheet.cs(59,39): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/ItemEnhancement.cs(55,47): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/WeeklyArenaState.cs(398,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Mail/Mail.cs(56,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/ItemUsable.cs(117,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Action/ItemEnhancement.cs(302,24): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<string, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/CombinationQuest.cs(61,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/WeeklyArenaState.cs(73,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/WeeklyArenaState.cs(75,48): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.Address, Nekoyume.Model.State.ArenaInfo> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.Address, Nekoyume.Model.State.ArenaInfo> is unspecified; explicitly sort them before enumerating.
TableData/Item/EquipmentItemSetEffectSheet.cs(78,41): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, int> is indeterministic since the order of System.Collections.Generic.Dictionary<int, int> is unspecified; explicitly sort them before enumerating.
TableData/Item/EquipmentItemSetEffectSheet.cs(83,50): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Stat.StatModifier> is indeterministic since the order of System.Collections.Generic.Dictionary<int, Nekoyume.Model.Stat.StatModifier> is unspecified; explicitly sort them before enumerating.
TableData/Item/EquipmentItemSheet.cs(46,81): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/QuestReward.cs(31,13): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, int> is indeterministic since the order of System.Collections.Generic.Dictionary<int, int> is unspecified; explicitly sort them before enumerating.
TableData/Quest/QuestSheet.cs(28,47): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Skill/Skill.cs(84,43): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/GeneralQuest.cs(77,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/Consumable.cs(32,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/Chest.cs(36,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/GoldQuest.cs(65,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/ItemEnhancementQuest.cs(66,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/WeeklyArenaState.cs(225,20): error LAA1002: Enumerating an instance of System.Collections.Generic.HashSet<Libplanet.Address> is indeterministic since the order of System.Collections.Generic.HashSet<Libplanet.Address> is unspecified; explicitly sort them before enumerating.
Model/State/WeeklyArenaState.cs(254,20): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.Address, Nekoyume.Model.State.ArenaInfo> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.Address, Nekoyume.Model.State.ArenaInfo> is unspecified; explicitly sort them before enumerating.
Model/Quest/ItemTypeCollectQuest.cs(67,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/ItemGradeQuest.cs(65,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/Costume.cs(34,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/Quest.cs(356,53): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/Equipment.cs(66,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Item/Inventory.cs(83,54): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/Quest.cs(90,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Quest/MonsterQuest.cs(57,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/StateExtensions.cs(249,17): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.HashDigest<System.Security.Cryptography.SHA256>, int> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.HashDigest<System.Security.Cryptography.SHA256>, int> is unspecified; explicitly sort them before enumerating.
Model/Stat/StatsMap.cs(153,17): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Nekoyume.Model.Stat.StatType, Nekoyume.Model.Stat.StatMapEx> is indeterministic since the order of System.Collections.Generic.Dictionary<Nekoyume.Model.Stat.StatType, Nekoyume.Model.Stat.StatMapEx> is unspecified; explicitly sort them before enumerating.
Model/State/ActivatedAccountsState.cs(54,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Stat/StatMapEx.cs(69,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/Stat/StatMap.cs(66,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/AdminState.cs(37,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/State.cs(33,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/ShopState.cs(34,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/ShopState.cs(37,21): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<System.Guid, Nekoyume.Model.Item.ShopItem> is indeterministic since the order of System.Collections.Generic.Dictionary<System.Guid, Nekoyume.Model.Item.ShopItem> is unspecified; explicitly sort them before enumerating.
Model/State/RedeemCodeState.cs(47,39): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/AgentState.cs(44,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/AgentState.cs(47,21): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<int, Libplanet.Address> is indeterministic since the order of System.Collections.Generic.Dictionary<int, Libplanet.Address> is unspecified; explicitly sort them before enumerating.
Model/State/AgentState.cs(54,45): error LAA1002: Enumerating an instance of System.Collections.Generic.HashSet<int> is indeterministic since the order of System.Collections.Generic.HashSet<int> is unspecified; explicitly sort them before enumerating.
Model/State/RankingState.cs(23,41): error LAA1002: Enumerating an instance of System.Collections.Generic.HashSet<Libplanet.Address> is indeterministic since the order of System.Collections.Generic.HashSet<Libplanet.Address> is unspecified; explicitly sort them before enumerating.
Model/State/RedeemCodeState.cs(77,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/RedeemCodeState.cs(79,49): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.Crypto.PublicKey, Nekoyume.Model.State.RedeemCodeState.Reward> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.Crypto.PublicKey, Nekoyume.Model.State.RedeemCodeState.Reward> is unspecified; explicitly sort them before enumerating.
Model/State/RankingState.cs(57,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/RankingState.cs(59,56): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.Address, System.Collections.Immutable.ImmutableHashSet<Libplanet.Address>> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.Address, System.Collections.Immutable.ImmutableHashSet<Libplanet.Address>> is unspecified; explicitly sort them before enumerating.
Model/State/RankingState.cs(63,34): error LAA1002: Enumerating an instance of System.Collections.Immutable.ImmutableHashSet<Libplanet.Address> is indeterministic since the order of System.Collections.Immutable.ImmutableHashSet<Libplanet.Address> is unspecified; explicitly sort them before enumerating.
Model/State/RankingMapState.cs(58,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/RankingMapState.cs(60,49): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Libplanet.Address, Nekoyume.Model.State.RankingInfo> is indeterministic since the order of System.Collections.Generic.Dictionary<Libplanet.Address, Nekoyume.Model.State.RankingInfo> is unspecified; explicitly sort them before enumerating.
Model/State/PendingActivationState.cs(54,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/RankingMapState.cs(138,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/GoldCurrencyState.cs(42,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/DeletedAvatarState.cs(26,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/CreditsState.cs(35,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/GameConfigState.cs(68,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/CombinationSlotState.cs(85,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/AvatarState.cs(441,39): error LAA1002: Enumerating an instance of System.Collections.Immutable.ImmutableHashSet<Nekoyume.Model.Item.Equipment> is indeterministic since the order of System.Collections.Immutable.ImmutableHashSet<Nekoyume.Model.Item.Equipment> is unspecified; explicitly sort them before enumerating.
Model/State/AvatarState.cs(416,37): error LAA1002: Enumerating an instance of System.Collections.Immutable.ImmutableHashSet<Nekoyume.Model.Item.Costume> is indeterministic since the order of System.Collections.Immutable.ImmutableHashSet<Nekoyume.Model.Item.Costume> is unspecified; explicitly sort them before enumerating.
Model/State/AuthorizedMinersState.cs(42,51): error LAA1002: Enumerating an instance of System.Collections.Immutable.ImmutableHashSet<Libplanet.Address> is indeterministic since the order of System.Collections.Immutable.ImmutableHashSet<Libplanet.Address> is unspecified; explicitly sort them before enumerating.
Model/State/AuthorizedMinersState.cs(46,35): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.
Model/State/AvatarState.cs(467,28): error LAA1002: Enumerating an instance of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is indeterministic since the order of System.Collections.Generic.Dictionary<Bencodex.Types.IKey, Bencodex.Types.IValue> is unspecified; explicitly sort them before enumerating.

@codecov
Copy link

codecov bot commented Oct 15, 2020

Codecov Report

Merging #1035 into main will decrease coverage by 0.43%.
The diff coverage is 86.41%.

@@            Coverage Diff             @@
##             main    #1035      +/-   ##
==========================================
- Coverage   88.81%   88.38%   -0.44%     
==========================================
  Files         288      342      +54     
  Lines       26766    31292    +4526     
==========================================
+ Hits        23771    27656    +3885     
- Misses       1466     1970     +504     
- Partials     1529     1666     +137     
Impacted Files Coverage Δ
Libplanet.Stun/Stun/Messages/StunMessage.cs 70.10% <0.00%> (ø)
Libplanet.Tests/Common/Action/ExecuteRecord.cs 60.00% <0.00%> (-40.00%) ⬇️
Libplanet.Tests/Net/SwarmTest.Fixtures.cs 100.00% <ø> (ø)
...lanet.Tests/Net/SwarmTest.TrustedStateCompleter.cs 98.63% <ø> (ø)
Libplanet.Tests/Store/StateStoreTracker.cs 60.00% <0.00%> (ø)
Libplanet.Tests/Tx/TransactionTest.cs 92.77% <ø> (ø)
Libplanet/Action/MissingActionTypeException.cs 80.00% <ø> (ø)
Libplanet/Action/PolymorphicAction.cs 100.00% <ø> (ø)
Libplanet/AddressExtensions.cs 100.00% <ø> (ø)
...lanet/Blockchain/IncompleteBlockStatesException.cs 37.50% <ø> (ø)
... and 212 more

longfin
longfin previously approved these changes Oct 16, 2020
earlbread
earlbread previously approved these changes Oct 16, 2020
@limebell
Copy link
Member

limebell commented Oct 16, 2020

Libplanet.Analyzers.Tests.ActionAnalyzerTest.LA1001_SystemRandomBreaksActionDeterminism seems fail except for MacOS_Unity

riemannulus
riemannulus previously approved these changes Oct 16, 2020
moreal
moreal previously approved these changes Oct 16, 2020
@dahlia
Copy link
Contributor Author

dahlia commented Oct 16, 2020

@planetarium/libplanet Addressed noisy false alarms and rebased on the up-to-date main branch. Please review this again!

dahlia added a commit to dahlia/lib9c that referenced this pull request Oct 16, 2020
@earlbread
Copy link
Contributor

The tests on Windows seem to be failed.

moreal
moreal previously approved these changes Oct 16, 2020
@dahlia dahlia requested a review from moreal October 16, 2020 14:13
@dahlia
Copy link
Contributor Author

dahlia commented Oct 16, 2020

@planetarium/libplanet Fixed the build and now all green. Please review this again!

@dahlia dahlia merged commit 3d1d561 into planetarium:main Oct 19, 2020
dahlia added a commit to dahlia/lib9c that referenced this pull request Oct 19, 2020
dahlia added a commit to dahlia/lib9c that referenced this pull request Oct 19, 2020
dahlia added a commit to dahlia/lib9c that referenced this pull request Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants