cdt/releng/scripts/cleanup.py
Torbjörn Svensson e632011f2c Bug 568728: Drop execute permission on files
Add enforecment script that verifies that only specified file types are
allowed to be mared as executable.

Change-Id: I4b40e3a46b03bfc78a9dcd52e8bf29cb079b7f3b
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-18 17:38:22 +01:00

20 lines
950 B
Python
Executable file

###############################################################################
# Copyright (c) 2018, 2020 Kichwa Coders Ltd and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
###############################################################################
# This script is used as part of the rebase_helper.sh script
loadModule('/System/UI')
while getActiveEditor():
# We need to cleanup twice. The first one may remove some code (like unneeded
# type parameters) that then needs to be reformatted.
executeUI("org.eclipse.jdt.internal.ui.actions.AllCleanUpsAction(getActiveEditor()).run()")
executeUI("org.eclipse.jdt.internal.ui.actions.AllCleanUpsAction(getActiveEditor()).run()")
executeUI("getActiveEditor().close(True)")