<commit_before>// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:analyzer/error/error.dart';

/**
 * The error codes used for warnings in analysis options files. The convention
 * for this class is for the name of the error code to indicate the problem that
 * caused the error to be generated and for the error message to explain what is
 * wrong and, when appropriate, how the problem can be corrected.
 */
class ManifestWarningCode extends ErrorCode {
  /**
   * A code indicating that a specified hardware feature is not supported on Chrome OS.
   */
  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_HARDWARE =
      const ManifestWarningCode(
          'UNSUPPORTED_CHROME_OS_HARDWARE',
          "This feature is not supported on Chrome OS. Try adding " +
              "`android:required=\"false\"` for this feature.",
          correction:
              "Try adding `android:required=\"false\"` for this " + "feature.");

  /**
   * A code indicating that a specified feature is not supported on Chrome OS.
   */
  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_FEATURE =
      const ManifestWarningCode(
          'UNSUPPORTED_CHROME_OS_FEATURE',
          "This feature is not supported on Chrome OS. Try changing " +
              "`android:required to \"false\"` for this feature.",
          correction: "Try changing to `android:required=\"false\"` for this " +
              "feature.");

  /**
   * A code indicating that the touchscreen feature is not specified in the
   * manifest.
   */
  static const ManifestWarningCode NO_TOUCHSCREEN_FEATURE = const ManifestWarningCode(
      'NO_TOUCHSCREEN_FEATURE',
      "The default \"android.hardware.touchscreen\" needs to be optional for Chrome OS. " +
          "Consider adding " +
          "<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />" +
          " to the manifest.",
      correction: "Consider adding " +
          "<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />" +
          " to the manifest.");

  /**
   * A code indicating that a specified permission is not supported on Chrome OS.
   */
  static const ManifestWarningCode PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE =
      const ManifestWarningCode(
          'PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE',
          "Permission exists without corresponding hardware tag `<uses-feature " +
              "android:name=\"{0}\"  android:required=\"false\">`.",
          correction:
              "Try adding the uses-feature with required=\"false\" attribute value.");

  /**
   * A code indicating that the camera permissions is not supported on Chrome OS.
   */
  static const ManifestWarningCode CAMERA_PERMISSIONS_INCOMPATIBLE =
      const ManifestWarningCode(
          'CAMERA_PERMISSIONS_INCOMPATIBLE',
          "Permission exists without corresponding hardware `<uses-feature " +
              "android:name=\"android.hardware.camera\"  android:required=\"false\">` " +
              "`<uses-feature " +
              "android:name=\"android.hardware.camera.autofocus\"  android:required=\"false\">`.",
          correction:
              "Try adding the uses-feature with required=\"false\" attribute value.");

  /**
   * A code indicating that the activity is set to be non resizable.
   */
  static const ManifestWarningCode NON_RESIZABLE_ACTIVITY =
      const ManifestWarningCode(
          'NON_RESIZABLE_ACTIVITY',
          "The `<activity>` element should be allowed to be resized to allow " +
              "users to take advantage of the multi-window environment on Chrome OS",
          correction: "Consider declaring the corresponding " +
              "activity element with `resizableActivity=\"true\"` attribute.");

  /**
   * A code indicating that the activity is locked to an orientation.
   */
  static const ManifestWarningCode SETTING_ORIENTATION_ON_ACTIVITY =
      const ManifestWarningCode(<commit_msg>Update manifest checks watnings and corrections<commit_after>// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:analyzer/error/error.dart';

/**
 * The error codes used for warnings in analysis options files. The convention
 * for this class is for the name of the error code to indicate the problem that
 * caused the error to be generated and for the error message to explain what is
 * wrong and, when appropriate, how the problem can be corrected.
 */
class ManifestWarningCode extends ErrorCode {
  /**
   * A code indicating that a specified hardware feature is not supported on Chrome OS.
   */
  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_HARDWARE =
      const ManifestWarningCode('UNSUPPORTED_CHROME_OS_HARDWARE',
          "This feature is not supported on Chrome OS, consider making it optional.",
          correction:
              "Try adding `android:required=\"false\"` for this " + "feature.");

  /**
   * A code indicating that a specified feature is not supported on Chrome OS.
   */
  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_FEATURE =
      const ManifestWarningCode('UNSUPPORTED_CHROME_OS_FEATURE',
          "This feature is not supported on Chrome OS, consider making it optional.",
          correction: "Try changing to `android:required=\"false\"` for this " +
              "feature.");

  /**
   * A code indicating that the touchscreen feature is not specified in the
   * manifest.
   */
  static const ManifestWarningCode NO_TOUCHSCREEN_FEATURE = const ManifestWarningCode(
      'NO_TOUCHSCREEN_FEATURE',
      "The default \"android.hardware.touchscreen\" needs to be optional for Chrome OS. ",
      correction: "Consider adding " +
          "<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />" +
          " to the manifest.");

  /**
   * A code indicating that a specified permission is not supported on Chrome OS.
   */
  static const ManifestWarningCode PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE =
      const ManifestWarningCode('PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE',
          "Permission makes app incompatible for Chrome OS, consider adding optional {0} feature tag, ",
          correction: " Try adding `<uses-feature " +
              "android:name=\"{0}\"  android:required=\"false\">`.");

  /**
   * A code indicating that the camera permissions is not supported on Chrome OS.
   */
  static const ManifestWarningCode CAMERA_PERMISSIONS_INCOMPATIBLE = const ManifestWarningCode(
      'CAMERA_PERMISSIONS_INCOMPATIBLE',
      "Camera permissions make app incompatible for Chrome OS, consider adding " +
          "optional features \"android.hardware.camera\" and \"android.hardware.camera.autofocus\".",
      correction: "Try adding `<uses-feature " +
          "android:name=\"android.hardware.camera\"  android:required=\"false\">` " +
          "`<uses-feature " +
          "android:name=\"android.hardware.camera.autofocus\"  android:required=\"false\">`.");

  /**
   * A code indicating that the activity is set to be non resizable.
   */
  static const ManifestWarningCode NON_RESIZABLE_ACTIVITY =
      const ManifestWarningCode(
          'NON_RESIZABLE_ACTIVITY',
          "The `<activity>` element should be allowed to be resized to allow " +
              "users to take advantage of the multi-window environment on Chrome OS",
          correction: "Consider declaring the corresponding " +
              "activity element with `resizableActivity=\"true\"` attribute.");

  /**
   * A code indicating that the activity is locked to an orientation.
   */
  static const ManifestWarningCode SETTING_ORIENTATION_ON_ACTIVITY =
      const ManifestWarningCode(
{'fraction_non_alphanumeric': 0.0901496259351621, 'fraction_numerical': 0.001371571072319202, 'mean_word_length': 3.0736414423565264, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1788190', 'n_tokens_mistral': 2098, 'n_tokens_neox': 2075, 'n_words': 742}