Skip to content

Commit

Permalink
Remove the ability to suppress invalid metadata warnings (as a catego…
Browse files Browse the repository at this point in the history
…ry). (#3227)
  • Loading branch information
InsertCreativityHere authored Dec 4, 2024
1 parent 9684034 commit 908fe12
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 169 deletions.
2 changes: 1 addition & 1 deletion cpp/src/Slice/MetadataValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Slice::validateMetadata(const UnitPtr& p, string_view prefix, map<string, Metada
MetadataInfo suppressWarningInfo = {
{typeid(Unit)},
MetadataArgumentKind::AnyNumberOfArguments,
{{"all", "deprecated", "invalid-metadata", "invalid-comment"}},
{{"all", "deprecated", "invalid-comment"}},
};
suppressWarningInfo.mustBeUnique = false;
knownMetadata.emplace("suppress-warning", std::move(suppressWarningInfo));
Expand Down
4 changes: 0 additions & 4 deletions cpp/src/Slice/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,6 @@ Slice::DefinitionContext::initSuppressedWarnings()
{
_suppressedWarnings.insert(Deprecated);
}
else if (s == "invalid-metadata")
{
_suppressedWarnings.insert(InvalidMetadata);
}
else if (s == "invalid-comment")
{
_suppressedWarnings.insert(InvalidComment);
Expand Down
4 changes: 1 addition & 3 deletions cpp/test/Ice/defaultValue/Test.ice
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
// Copyright (c) ZeroC, Inc.

#pragma once

Expand Down
Empty file.
102 changes: 0 additions & 102 deletions cpp/test/Slice/errorDetection/WarningSuppressInvalidMetadata.ice

This file was deleted.

6 changes: 1 addition & 5 deletions cpp/test/Slice/escape/Key.ice
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

[["suppress-warning:deprecated"]]
// Copyright (c) ZeroC, Inc.

module and
{
Expand Down
11 changes: 3 additions & 8 deletions csharp/test/Ice/defaultValue/Test.ice
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
// Copyright (c) ZeroC, Inc.

#pragma once

//
// Suppress warnings
//
[["suppress-warning:invalid-metadata, deprecated"]]
["cs:namespace:Ice.defaultValue"]
[["suppress-warning:deprecated"]] // For enumerator references

["cs:namespace:Ice.defaultValue"]
module Test
{

Expand Down
10 changes: 3 additions & 7 deletions csharp/test/Ice/stream/Test.ice
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
// Copyright (c) ZeroC, Inc.

#pragma once

//
// Suppress invalid metadata warnings
//
[["suppress-warning:invalid-metadata"]]
// Suppress invalid metadata warnings which we expect this test to generate.
[["suppress-warning"]]

#include "Ice/BuiltinSequences.ice"

Expand Down
5 changes: 1 addition & 4 deletions csharp/test/Slice/escape/Key.ice
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
// Copyright (c) ZeroC, Inc.

#pragma once

[["suppress-warning:deprecated"]]
module abstract
{

Expand Down
7 changes: 3 additions & 4 deletions java/test/src/main/java/test/Slice/escape/Key.ice
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
// Copyright (c) ZeroC, Inc.

#pragma once

[["java:package:test.Slice.escape", "suppress-warning:deprecated"]]
[["java:package:test.Slice.escape"]]

module abstract
{

Expand Down
9 changes: 1 addition & 8 deletions js/test/Ice/stream/Test.ice
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
// Copyright (c) ZeroC, Inc.

#pragma once

//
// Suppress invalid metadata warnings
//
[["suppress-warning:invalid-metadata, deprecated"]]

#include "Ice/BuiltinSequences.ice"

module Test
Expand Down
6 changes: 1 addition & 5 deletions php/test/Slice/escape/Key.ice
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

[["suppress-warning:deprecated"]]
// Copyright (c) ZeroC, Inc.

module and
{
Expand Down
6 changes: 1 addition & 5 deletions python/test/Slice/escape/Key.ice
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

[["suppress-warning:deprecated"]]
// Copyright (c) ZeroC, Inc.

module and
{
Expand Down
6 changes: 1 addition & 5 deletions ruby/test/Slice/escape/Key.ice
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//

[["suppress-warning:deprecated"]]
// Copyright (c) ZeroC, Inc.

module BEGIN
{
Expand Down
3 changes: 1 addition & 2 deletions swift/test/Ice/proxy/Test.ice
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// Copyright (c) ZeroC, Inc.

#pragma once

#include "Ice/Context.ice"

[["suppress-warning:deprecated"]]

module Test
{

Expand Down
6 changes: 1 addition & 5 deletions swift/test/Ice/stream/Test.ice
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// Copyright (c) ZeroC, Inc.

#pragma once

#include "Ice/BuiltinSequences.ice"

//
// Suppress invalid metadata warnings
//
[["suppress-warning:invalid-metadata"]]

[["swift:class-resolver-prefix:IceStrem"]]
module Test
{
Expand Down
1 change: 0 additions & 1 deletion swift/test/Slice/escape/Key.ice
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright (c) ZeroC, Inc.
[["suppress-warning:deprecated"]]

module and
{
Expand Down

0 comments on commit 908fe12

Please sign in to comment.